Domainを作成します。
自動完成設定及び修正はDomain作成以降、可能です。
インデックス(index)は、Domain作成してから追加は可能であるが、作成した後に削除は不可能です。
POST https://cloudsearch.apigw.ntruss.com/CloudSearch/real/v1/domain
リクエスト
リクエストボディ
フィールド名 |
必須 |
タイプ |
制約事項 |
説明 |
name |
Yes |
string |
英文字、 "_"ではじまる、英文字、数字、 "_"、"-" 許容、最小3文字、最大20文字まで入力 |
作成するDomain名 |
type |
Yes |
string |
small, medium, large, xlarge, xxlarge, xxxlargeの中、一つを選択(Default:small) |
コンテナ規模設定 small: Standard - 4: メモリ4GB / ストレージ30GB / お勧め最大Document数100万個 / お勧めインデックス2個 medium: Standard - 8: メモリ8GB / ストレージ50GB / お勧め最大Document数200万個 / お勧めインデックス3個large: Standard - 16: メモリ16GB / ストレージ100GB / お勧め最大Document数400万個 / お勧めインデックス4個xlarge: Standard - 32: メモリ32GB / ストレージ200GB / お勧め最大Document数800万個 / お勧めインデックス5個xxlarge: High Memory - 64: メモリ64GB / ストレージ400GB / お勧め最大Document数1600万個 / お勧めインデックス6個xxxlarge: High Memory - 128: メモリ128GB / ストレージ800GB / お勧め最大Document数3200万個 / お勧めインデックス7個 |
indexerCount |
Yes |
number |
現在は1のみ設定可能 |
インデックスを担当するコンテナの個数 |
searcherCount |
Yes |
number |
Min:1, Max:4 |
検索を担当するコンテナの個数 |
description |
Yes |
string |
0 ~ 100文字まで入力 |
作成するDomainに対する説明 |
schema.document |
Yes |
Schema |
有効なSchema(Schema検証を通じて確認可能) |
作成するDomainの検索設定 |
レスポンス
レスポンスStatus
HTTP Status |
Desc |
200 |
OK(作成完了) |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
例示
リクエスト例示
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"
}
]
}
]
}
}
}
レスポンス例示
{"result":"ok"}