I have the following mapping:
Notice that i added most of my Java code which explains how i build my
query, and also an unit test of the result (i hope it will help others)
Is there a simple way to get highlights when using a multi_field?
The pain is:
- I need to use a boolean/text search on these 3 fields
- I need to store=yes for all of them or i can't get the highlights from
searches which match thanks to a field with store=false
- I need to add highlights for the 3 fields or i only get the highlights
when it was matched by the field analyzer
- My highlight map has now 3 fields and i must select/merge the most
appropriate one (exact match > stemming > ngrams for me)
What is the effect of using store=yes on each subfield? Is the original
field going to be stored 3 times and take useless space???
Isn't there a way to build simpler queries just on the multi_field instead
of including all the subfields in my queries?
And to have highlights merged automatically?
For exemple if we have a match against 2 fields "stemmer" + "ngrams", is
there an option to have something like "i want the biggest/smaller
highlight for a field"
For exemple, on a search "descript":
- Ngrams (4->8) will match on "descript" and produce "descript" highlight
- Stemming will match on description stemmed to "descript" and produce