At first I wanted to install the default analyzer ES and failed. And then, on other issues and websites, I try to set the default analyzer for a single index. But there are some problems.
I configured the ik analyzer and I can install the field analyzer, here is my command:
curl -XPUT localhost:9200/test
curl -XPUT localhost:9200/test/test/_mapping -d'{ "test":{ "properties":{ "name":{ "type":"string", "analyzer":"ik" } } } }'
and get a message:
{"acknowledged":true}
also, it works as my wish.
but if I try to install the default index parser:
curl -XPOST localhost:9200/test1?pretty -d '{ "index":{ "analysis" : { "analyzer" : { "default" : { "type" : "ik" } } } } }'
An error message will appear:
{ "error" : { "root_cause" : [ { "type" : "index_creation_exception", "reason" : "failed to create index" } ], "type" : "illegal_argument_exception", "reason" : "no default analyzer configured" }, "status" : 400 }
So weird, isn't it? We look forward to hearing your views on this issue. Thank you :)
source share