Edit schema
- Print
- PDF
Edit schema
- 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.
When a schema is edited, indexes can only be added.
PUT https://cloudsearch.apigw.ntruss.com/CloudSearch/real/v1/domain/{name}/schema
Request
Request Parameters
Parameter | Required | Type | Limitations | Description |
---|---|---|---|---|
name | Y | string | Domain name |
Request Body
Field | Required | Type | Limitations | Description |
---|---|---|---|---|
schema.document | Y | Schema | Valid schema (A schema can be validated via Validate schema) | Search settings |
Response
Response status
HTTP status | Description |
---|---|
200 | OK (Successfully edited) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Examples
Request Example - Add student index to search all of the name and phone_number sections to the schema created
PUT https://cloudsearch.apigw.ntruss.com/CloudSearch/real/v1/domain/student/schema
PUT /CloudSearch/real/v1/domain/student/schema HTTP/1.1
Host:cloudsearch.apigw.ntruss.com
accept:application/json
x-ncp-apigw-signature-v2: NR8ES668xeqaO4M6gvDfmHmJZB9lVHs7p/qbytdW1BI=
x-ncp-apigw-timestamp: 1545973892478
x-ncp-iam-access-key: teGTwtcSEGA7fu28BGGi
{
"document": {
"primarySectionName": "name",
"sections": [
{
"docProperties": [
{
"type": "string",
"name": "dp_name"
}
],
"name": "name"
},
{
"docProperties": [
{
"type": "string",
"name": "dp_phone_number"
}
],
"name": "phone_number"
}
],
"indexes": [
{
"documentTermWeight": "sum_wgt",
"buildInfos": [
{
"sections": [
"name"
],
"sectionTermWeight": "1.0 * stw_2p(tf, 0.5, 0.25, 0., length / 128.0)",
"indexProcessors": [
{
"type": "hanaterm",
"method": "sgmt",
"option": "+korea +josacat +eomicat"
}
],
"name": "index_build_0"
}
],
"name": "name"
},
{
"documentTermWeight": "sum_wgt",
"buildInfos": [
{
"sections": [
"name",
"phone_number"
],
"sectionTermWeight": "1.0 * stw_2p(tf, 0.5, 0.25, 0., length / 128.0)",
"indexProcessors": [
{
"type": "hanaterm",
"method": "sgmt",
"option": "+korea +josacat +eomicat"
}
],
"name": "index_build_0"
}
],
"name": "student"
}
]
}
}
Request Example (common)
{
"result": "OK"
}
Was this article helpful?