Create domain
- Print
- PDF
Create domain
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
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.
- You can enable and edit autocomplete after creating a domain.
An index can be added after a domain is created, but cannot be deleted.
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 |
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"}
Was this article helpful?