Hello,
Is it possible to highlight a copy_to field?
I have a title which I want to be able to analyze two different ways. One with stop words and stemming, and one without. I can effectively query the search results against either field, however when using the copy_to field in a highlight_query I do not see any highlight results.
Below is the relevant mapping.
"stemmed_index": {
"type": "custom",
"char_filter": "html_strip",
"tokenizer": "standard",
"filter": [
"standard",
"synonym_filter",
"stop",
"lowercase",
"stemmer",
"asciifolding"
]
},
"stemmed_search": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"standard",
"synonym_filter",
"stop",
"lowercase",
"stemmer",
"asciifolding"
]
},
"index_unstemmed": {
"type": "custom",
"char_filter": "html_strip",
"tokenizer": "standard",
"filter": [
"common_grams_index",
"lowercase"
]
},
"search_unstemmed": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"synonym_filter",
"lowercase"
]
},
"title": {
"type": "text",
"analyzer": "stemmed_index",
"search_analyzer": "stemmed_search",
"term_vector": "with_positions_offsets",
"copy_to": [
"title_unstemmed"
]
},
"title_unstemmed": {
"type": "text",
"analyzer": "index_unstemmed",
"search_analyzer": "search_unstemmed",
"term_vector": "with_positions_offsets",
"include_in_all": true
}
I found this StackOverflow post but even using the same mapping between my title and title_unstemmed fields did not fix my highlighting issue.
Thanks.