Query Analysis Count
    • PDF

    Query Analysis Count

    • PDF

    Article summary

    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 NameRequiredTypeRestrictionsDescription
    nameYesstringThe name of the created domain

    Request body

    Field NameRequiredTypeRestrictionsDescription
    fromYesstringStart time (UTC, ex: 20161027T171340Z)
    toYesstringEnd time (UTC, ex: 20161027T171340Z)
    fieldYesQueryAnalysisFieldAggregation field settings
    max_sizeYesstringMaximum Size to return

    Response

    Field NameTypeDescriptionRemarks
    keystringThe value corresponding to the selected field
    doc_countnumberCount of selected field

    Response Status

    Http StatusDesc
    200OK
    200status.code : -1(request fail)
    400Bad Request
    401Unauthorized
    401there is no such service
    403Forbidden
    404Not Found
    500Internal 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
      }
    ]
    
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.