Hi Mathew, Did you try hl.requireFieldMatch=true; this would force Highlighter to only generate highlights on matched field's
Thanks, Abhishek On Sat, Apr 17, 2021, 13:02 Roth, Matthew <matthew.g.r...@yale.edu> wrote: > Hi List, > > I am using 7.7.3 and I have a query where I would like to use the original > highlighter to look for matches in the text of the document, the title, or > a multivalued tag field. > > When I use hl.perserveMulti it returns the entire contents of the field > because I also am using an hl.fragsize of zero. I can get around this by > specifying f.TAG_NAME.hl.perserveMulti. This will only apply the > perserveMutli rule to the multivalued TAG_NAME field. However, it will > return the entire contents of the field even when no match. Is there a way > to only return contents when there is a match to hl.q? > > Ultimately, I can just ignore this and always grab the results of the > highlighted field from the response. But I'd prefer to only do that if it > contains a match. > > Thanks, > Matt >