Create domain

Prev Next

We are preparing a localization service for the content. We will do our best to provide the localization service as soon as possible.

Creates a domain.

POST https://cloudsearch.apigw.ntruss.com/CloudSearch/real/v1/domain

Request

Request Body

Field Required Type Limitations Description
name Y string Only English alphabet, numbers, "_" and "-" are allowed. The name must start with an alphabetical character or "_", and must be between 3 and 20 characters in length. Name of a domain to create
type Y string Select one of the following: small, medium, large, xlarge, xxlarge, and xxxlarge (default: small). Scale of containers
  • small: Standard - 4: Memory 4 GB / Storage 30 GB / Max. of 1 million documents recommended / 2 indexes recommended
  • medium: Standard - 8: Memory 8 GB / Storage 50 GB / Max. of 2 million documents recommended / 3 indexes recommended
  • large: Standard - 16: Memory 16 GB / Storage 100 GB / Max. of 4 million documents recommended / 3 indexes recommended
  • xlarge: Standard - 32: Memory 32 GB / Storage 200 GB / Max. of 8 million documents recommended / 5 indexes recommended
  • xxlarge: High Memory - 64: Memory 64 GB / Storage 400 GB / Max. of 16 million documents recommended / 6 indexes recommended
  • xxxlarge: High Memory - 128: Memory 128 GB / Storage 800 GB / Max. of 32 million documents recommended / 7 indexes recommended
  • indexerCount Y number The only available value is 1 for now. Number of containers handling indexes
    searcherCount Y number Min: 1, Max: 4 Number of containers handling searches
    description Y string 0-100 characters Description of a domain to create
    schema.document Y Schema Valid schema (A schema can be validated via Validate schema) Search settings of a domain to create

    Response

    Response status

    HTTP status Description
    200 OK (Successfully created)
    400 Bad Request
    401 Unauthorized
    403 Forbidden
    404 Not Found
    500 Internal Server Error

    Examples

    Request Example

    POST /CloudSearch/real/v1/domain HTTP/1.1
    Host: cloudsearch.apigw.ntruss.com
    accept:application/json
    x-ncp-apigw-signature-v2: vuJdaypGE9ivNY3v/dRU/D96/HGmqgX1081UAjlOqbw=
    x-ncp-apigw-timestamp: 1545800662952
    x-ncp-iam-access-key: teGTwtcSEGA7fu28BGGi
    
    {
      "name": "car_dev",
      "description": "",
      "type": "small",
      "indexerCount": 1,
      "searcherCount": 1,
      "schema": {
        "document": {
          "primarySectionName": "docid",
          "sections": [
            {
              "name": "docid"
            },
            {
              "name": "brand"
            },
            {
              "name": "name"
            },
            {
              "docProperties": [
                {
                  "type": "string",
                  "name": "dp_color"
                }
              ],
              "name": "color"
            },
            {
              "docProperties": [
                {
                  "type": "uint32",
                  "name": "dp_price"
                }
              ],
              "name": "price"
            },
            {
              "docProperties": [
                {
                  "type": "string",
                  "name": "dp_type"
                }
              ],
              "name": "type"
            },
            {
              "docProperties": [
                {
                  "type": "uint32",
                  "name": "dp_sell_cnt"
                }
              ],
              "name": "sell_cnt"
            },
            {
              "name": "image_url"
            }
          ],
          "indexes": [
            {
              "name": "brand_name",
              "documentTermWeight": "sum_wgt",
              "buildInfos": [
                {
                  "indexProcessors": [
                    {
                      "type": "hanaterm",
                      "method": "sgmt",
                      "option": "+korea +josacat +eomicat"
                    }
                  ],
                  "sectionTermWeight": "1.0 * stw_2p(tf, 0.5, 0.25, 0., length / 128.0)",
                  "sections": [
                    "brand",
                    "name"
                  ],
                  "name": "index_build"
                }
              ]
            }
          ]
        }
      }
    }
    

    Request Example

    {"result":"ok"}