I'm finding that if a keyword appears in a field multiple times very close together, it will get highlighted as a phrase even though there are other terms between the two instances. So this search:
http://localhost:8983/solr/select/? hl=true& hl.snippets=1& q=residue& hl.fragsize=0& mergeContiguous=false& indent=on& hl.usePhraseHighlighter=false& debugQuery=on& hl.fragmenter=gap& hl.highlightMultiTerm=false Highlights as: What does "low-<em>residue" mean? Like low-residue</em> diet? Trying to get it to highlight as: What does "low-<em>residue</em>" mean? Like low-<em>residue</em> diet? I've tried playing with various combinations of mergeContiguous, highlightMultiTerm, and usePhraseHighlighter, but they all yield the same output. For reference, field type uses a StandardTokenizerFactory and SynonymFilterFactory, StopFilterFactory, StandardFilterFactory and SnowballFilterFactory. I've confirmed that the intermediate words don't appear in either the synonym or the stop words list. I can post the full definition if helpful. Any pointers as to how to debug this would be greatly appreciated! sasank