By default, Solr highlights searched terms in the summary content as described in the following snippet:

criteria="Services solr"

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.
  1. Stop ColdFusion Add-on services.
  2. 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>


    <str name="hl.fl">contents title</str>


  3. Replace the following section in the schema.xml

    <field name="contents" type="text" indexed="true" stored="false" required="false" multiValued="true" omitNorms="true"/>


    <field name="contents" type="text" indexed="true" stored="true" required="false" multiValued="true" omitNorms="true"/>


  4. Restart Solr.
  5. Reindex the collection.

    Note: The modifications to solrconfig.xml and schema.xml will increase the index size.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy