lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Drouin <>
Subject How to create highlight search component using Config API
Date Wed, 29 Jun 2016 13:00:07 GMT

I'm trying to create a highlight search component using the Config API of Solr 6.0.1 however
I cannot figure out how to include the elements fragmenter, formatter, encoder, etc...

Let's say I have the following component:

  <searchComponent class="solr.HighlightComponent" name="myHighlightingComponent">
      <fragmenter name="gap" default="true" class="solr.highlight.GapFragmenter">
        <lst name="defaults">
          <int name="hl.fragsize">100</int>
      <formatter name="html" default="true" class="solr.highlight.HtmlFormatter">
        <lst name="defaults">
          <str name="hl.simple.pre"><![CDATA[<em>]]></str>
          <str name=""><![CDATA[</em>]]></str>
      <encoder name="html" class="solr.highlight.HtmlEncoder" />

>From what I can see from the documentation my JSON should look a bit like this:


However I have no idea how to defines the 2 fragmenters or the encoder.  Any help is appreciated.


View raw message