I am using a multi-field and I'm having an interesting issue with highlighting that I'm surprised no else has posted yet.
I have a field called title, within this field I have another title called merged_title which has an analyzer defined on it that strips hyphens and merges the word. So if I search for "anti-emetic" it highlights just on titlebecause the original document text contained "anti-emetic" therefore it was tokenized individually. However in the instance where you search for "antiemetic" and the orginal document text contains "antiemetic" without a hyphen it highlights both on the title field and merged_titlefield. Is it possible to have it highlight only on one field in this instance?
I've also set "store:yes" and term_vector" : "with_positions_offsets", for both fields as I wasn't sure which field should have this option. Any ideas what I'm doing wrong? Btw my fields are heavily nested hence the wildcard characters.
Hey Nik, thanks for the swift response, you're right, the issue does seem to be with the wild cards, do I have any options for moving forward at all? I'm working an a project and I'm so close to finishing it. This is one of the last requirements, it's almost there! On a side note is it necessary to specify "*title" twice once under "fields" and then in "matched_fields"? It's just that I removed it from "matched_fields" and it still worked and returned the highlighted text for *title even though I searched explicitly in "*merge_title".