elasticsearch-jdbc icon indicating copy to clipboard operation
elasticsearch-jdbc copied to clipboard

type_mapping not effect

Open hongjunsu opened this issue 7 years ago • 3 comments

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

hongjunsu avatar Apr 26 '17 11:04 hongjunsu

what is the issue?

sanaulla123 avatar May 01 '17 06:05 sanaulla123

I have the same issue. Any parameter other than type seems to be ignored. I cannot make a field not_analyzed.

cetetesoft avatar May 14 '17 20:05 cetetesoft

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" } } } }'

hongjunsu avatar May 17 '17 01:05 hongjunsu