Whatever message this page gives is out now! Go check it out!

Term highlighting

Last update:
May 18, 2026
By default, Solr highlights searched terms in the summary content as described in the following snippet:
collection="syn1"
criteria="Services solr"
name="results"
status="r"
suggestions="always"
contextPassages="1">
To highlight contents in the entire document, modify the  solrconfig .xml and schema.xml files. These files are available in the following locations:
  • <Solr Home>/multicore/template/conf: Modify files in this location to apply the changes to all future Solr collections.
  • <Collection Directory>/conf: Modify files in this location to apply the changes only to a particular collection.
Stop ColdFusion Add-on services.
Replace the following section in the solrconfig.xml, in the <requestHandler name="standard" and <requestHandler name="dismax" sections.
<str name="hl.fl">summary title</str>
with
<str name="hl.fl">contents title</str>
Replace the following section in the schema.xml
<field name="contents" type="text" indexed="true" stored="false" required="false" multiValued="true" omitNorms="true"/>
with
<field name="contents" type="text" indexed="true" stored="true" required="false" multiValued="true" omitNorms="true"/>
Restart Solr.
Reindex the collection.
Note:
The modifications to solrconfig.xml and schema.xml will increase the index size.

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page