(11/09/22 23:09), O. Klein wrote:
Im testing the new Boundaryscanner in the highlighter, but I can't get it to
show more then 1 snippet.

<str name="f.content_text.hl.snippets">2</str>

Bug or am I doing something wrong?

I think your content_text is too short to get more than one snippets?

Try the following with solr example (I'm using trunk):

1.
http://localhost:8983/solr/select?q=SD+AND+battery&fq=&fl=includes&hl=on&hl.fl=includes&hl.useFastVectorHighlighter=true&hl.snippets=2

you request 2 snippets, but Solr will return 1 snippet:

<lst name="highlighting">
  <lst name="9885A004">
    <arr name="includes">
      <str>32MB <em>SD</em> card, USB cable, AV cable, <em>battery</em> </str>
    </arr>
  </lst>
</lst>

2.
http://localhost:8983/solr/select?q=SD+AND+battery&fq=&fl=includes&hl=on&hl.fl=includes&hl.useFastVectorHighlighter=true&hl.snippets=2&hl.fragsize=18

now you request 2 snippets with shorter fragsize option, then Solr can return 2 
snippets:

<lst name="highlighting">
  <lst name="9885A004">
    <arr name="includes">
      <str>32MB <em>SD</em> card, USB cable</str>
      <str>cable, <em>battery</em> </str>
    </arr>
  </lst>
</lst>

koji
--
Check out "Query Log Visualizer" for Apache Solr
http://www.rondhuit-demo.com/loganalyzer/loganalyzer.html
http://www.rondhuit.com/en/

Reply via email to