...
column | type | description |
---|---|---|
index | text | name of the index, partition key |
type | text | the type for which the mapping should be applied, primary key |
version | int | part of primary key, can be used for auditing or getting current mapping |
mapping | text | the json of mapping called |
status | int | denotes 1 for success, 0 for failure |
response | text | response received from ES while calling update mapping |
createdBy | text | userId of person who called update mapping API |
createdOn | timestamp | when the API was invoked to update mapping |
API Structure
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Request
PUT /es/index/{indexName}/mapping
{
"type": "_doc",
"mapping": {
"dynamic": false,
"properties": {
"all_fields": {
"type": "text",
"fields": {
"raw": {
"type": "text",
"analyzer": "keylower"
}
},
"analyzer": "cs_index_analyzer",
"search_analyzer": "cs_search_analyzer"
},
"name": {
"type": "text",
"fields": {
"raw": {
"type": "text",
"analyzer": "keylower",
"fielddata": true
}
},
"copy_to": [
"all_fields"
],
"analyzer": "cs_index_analyzer",
"search_analyzer": "cs_search_analyzer",
"fielddata": true
}
}
}
}
}
Response
{
"id": "api.es.index.mapping",
"result": {
"response" : {
// response from ES
}
}
} |