elasticsearch-jdbc
elasticsearch-jdbc copied to clipboard
type_mapping not effect
the part of code in statefile.json
"index": "iptv_think",
"type": "data_think",
"type_mapping": {
"data_think": {
"properties": {
"namepy": {
"type": "string",
"analyzer": "whitespace"
},
"name": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
but run the script . use curl http://***/iptv_think/data_think/_mapping?pretty resualt is -- { "iptv_think" : { "mappings" : { "data_think" : { "properties" : { "name" : { "type" : "string" }, "namepy" : { "type" : "string" } } } } } }
please
what is the issue?
I have the same issue. Any parameter other than type
seems to be ignored. I cannot make a field not_analyzed
.
I solved this problem with way. not define type_mapping in script. but define type_mapping before running.
curl -XPOST http://localhost:9200/iptv_think/data_think/_mapping -d' { "data_think": { "properties": { "namepy": { "type": "string", "analyzer": "whitespace" }, "name": { "type": "string", "index":"not_analyzed" } } } }'