Hi there,
I have this setup:
Mapping:
"CEDANT": {
"type": "text",
"analyzer":"ire_regular",
"fields": {
"exact":{
"type": "text",
"analyzer": "ire_exact",
"term_vector":"with_positions_offsets",
"index_options" : "offsets"
}
}
}
Query template:
"highlight": {
"order": "score",
"number_of_fragments": 0,
"type": "plain",
"fragmenter": "span",
"fields": {
"CEDANT": {
"matched_fields": ["CEDANT"]
},
"CEDANT.exact": {
"matched_fields": ["CEDANT.exact"],
"type": "fvh",
"no_match_size": 1000,
"fragment_offset":0
}
}
so, if I use exact match (quoted search), CEDANT.exact is used.
Let's imagine I have a document with such sentence:
Federated Mutual Insurance
For proximity search
"Federated Insurance"~4, document match, highlighting works
But if I switch order of words:
"Insurance Federated "~4, document match, but highlighting DOES NOT work (nothing is highlighted)
Can anybody advise, how to proceed? Is it known ES bug? (I'm using ES 5.2.2) Or do I have to change some setting? I cannot use plain highlighter for exact match.