We are preparing a localization service for the content. We will do our best to provide the localization service as soon as possible.
Count every field by analyzing used Search Query.
- city1: city classification field1 ex) Seoul, Gyeonggi-do, Chungcheongbuk-do
- city2: city classification field2 ex) Gangnam-gu, Seocho, Guro-gu
- city3: city classification field2 ex) Yeoksam-dong, Jeongja-dong, Seocho-dong
- country: country
- word: word that stemmed from the search Query
POST https://cloudsearch.apigw.ntruss.com/CloudSearch/real/v1/domain/{name}/analysis/count
Request
Request parameter
Parameter Name |
Required |
Type |
Restrictions |
Description |
name |
Yes |
string |
|
The name of the created domain |
Request body
Field Name |
Required |
Type |
Restrictions |
Description |
from |
Yes |
string |
|
Start time (UTC, ex: 20161027T171340Z) |
to |
Yes |
string |
|
End time (UTC, ex: 20161027T171340Z) |
field |
Yes |
QueryAnalysisField |
|
Aggregation field settings |
max_size |
Yes |
string |
|
Maximum Size to return |
Response
Field Name |
Type |
Description |
Remarks |
key |
string |
The value corresponding to the selected field |
|
doc_count |
number |
Count of selected field |
|
Response Status
Http Status |
Desc |
200 |
OK |
200 |
status.code : -1(request fail) |
400 |
Bad Request |
401 |
Unauthorized |
401 |
there is no such service |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
Example
Example request - 'word' Field Count
POST https://cloudsearch.apigw.ntruss.com/CloudSearch/real/v1/domain/car_dev/document/search
POST /CloudSearch/real/v1/domain/car_dev/document/manage HTTP/1.1
Host:cloudsearch.apigw.ntruss.com
accept:application/json
x-ncp-apigw-signature-v2: cDwtHuQeGmwWyNmwlN6XIGA66zge4iMXvfoDQNna05g=
x-ncp-apigw-timestamp: 1545817618751
x-ncp-iam-access-key: teGTwtcSEGA7fu28BGGi
{
"from": "2019-09-25T05:00:00Z",
"to": "2019-09-25T15:00:00Z",
"field": "word",
"maxSize": 10
}
Example response
[
{
"key": "class",
"doc_count": 3117
},
{
"key": "bmw",
"doc_count": 3027
},
{
"key": "model",
"doc_count": 2968
},
{
"key": "2019",
"doc_count": 1585
},
{
"key": "e",
"doc_count": 1570
},
{
"key": "Sonata",
"doc_count": 1560
},
{
"key": "c",
"doc_count": 1547
},
{
"key": "2018",
"doc_count": 1539
},
{
"key": "Hyundai",
"doc_count": 1534
},
{
"key": "520",
"doc_count": 1517
}
]