Hi,

I believe, in your "colored" fragmentsBuilder definition, you have not
mentioned anything in your pre and post tags and that may be the reason
that you are getting snippets of text, without highlighting.
Please refer http://wiki.apache.org/solr/HighlightingParameters and check
the "hl.fragmentsBuilder" section.
Try specifying the pre and post tags with information as mentioned below.
(same as wiki link above)

<!-- multi-colored tag FragmentsBuilder -->
<fragmentsBuilder name="colored"
class="org.apache.solr.highlight.ScoreOrderFragmentsBuilder">
  <lst name="defaults">
    <str name="hl.tag.pre"><![CDATA[
         <b style="background:yellow">,<b style="background:lawgreen">,
         <b style="background:aquamarine">,<b style="background:magenta">,
         <b style="background:palegreen">,<b style="background:coral">,
         <b style="background:wheat">,<b style="background:khaki">,
         <b style="background:lime">,<b
style="background:deepskyblue">]]></str>
    <str name="hl.tag.post"><![CDATA[</b>]]></str>
  </lst>
</fragmentsBuilder>


On Mon, May 21, 2012 at 3:52 PM, 12rad <prama.an...@gmail.com> wrote:

> For the fragListBuilder
>  it's
> <fragListBuilder name="simple"
>                       default="true"
>                       class="solr.highlight.SimpleFragListBuilder"/>
>
> fragment builder is
> <fragmentsBuilder name="colored"
>                        class="solr.highlight.ScoreOrderFragmentsBuilder">
>        <lst name="defaults">
>          <str name="hl.tag.pre"></str>
>          <str name="hl.tag.post"></str>
>        </lst>
>      </fragmentsBuilder>
>
>
>  <fragmenter name="regex"
>                  class="solr.highlight.RegexFragmenter">
>        <lst name="defaults">
>
>          <int name="hl.fragsize">70</int>
>
>          <float name="hl.regex.slop">0.5</float>
>
>          <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
>        </lst>
>      </fragmenter>
>
>
> Thanks!
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Not-able-to-use-the-highlighting-feature-Want-to-return-snippets-of-text-Urgent-tp3985012p3985212.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Thanks and Regards
Rahul A. Warawdekar

Reply via email to