Thanks everyone who replied! The FastVectorHighlighter did the trick. Here
is how I configured it:

In solrconfig.xml:
In the requestHandler I added:
<str name="hl">on</str>
<str name=hl.fl">text</str>
<str name="hl.useFastVectorHighlighter">true</str>
<str name="hl.snippets">100</str>

In schema.xml:
I modified the text field:
<field name="text" type="text_general" indexed="true" multivalued="true"
termVectors="true" termOffsets="true" termPositions="true" />

I restarted Solr, re-indexed the documents and tested. All phrases are
correctly highlighted as phrases! Thanks everyone!

-Teague

Reply via email to