I set multi-analyzers like this
curl -X PUT "localhost:9200/sentences" -H 'Content-Type: application/json' -d'
{
"mappings": {
"_doc": {
"properties": {
"content": {
"type": "text",
"analyzer":"smartcn",
"term_vector": "yes",
"fields": {
"ik":{
"analyzer": "ik_max_word",
"search_analyzer": "ik_smart",
"type": "text"
},
"jieba":{
"analyzer": "jieba_index",
"search_analyzer": "jieba_search",
"type": "text"
}
}
}
}
}
}
}
'
So how do I specify a different analyzer than smartcn at query time ?
POST sentences/_doc/_search
{
"query" : { "match" : {
"content" :{"query":"some Chinese text","operator": "and"}
}}
}