I put a mapping into ES as followed:
curl -XPOST http://localhost:9200/developer/document/_mapping -d '
{
"document" : {
"properties" : {
"content" : {
"type" : "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word",
"copy_to":"single_word_content"
},
"ID" : {
"type" : "string"
},
"title" : {
"type" : "string",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word",
"copy_to":"single_word_content"
},
"single_word_content":{
"type": "string",
"analyzer":"standard",
}
}
}
}'
Then I insert a document without single_word_content field into ES. When I search from ES, no single_word_content field returned in the search results & highlight not working on single_word_content field either