You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Sean Bronée <se...@findwise.dk> on 2010/03/12 15:09:07 UTC

FW: highlighting snippet length

Hi everybody,
I would need a little help understanding what seems to be a rather erratic behavior in Solr Highlighting.
In my query I want the field "text" to be summarized, and want a maximum of 300 characters and 3 snippets.
I have therefore set fragsize=100 and snippets=3.
But there seems to be a rather unexplained behavior in Solr for all fragsize<=100, where sometimes the proposed highlighting ends up being much too short.

For example with the following query:
http://gbgsolr:8480/solr/select/?&sort=score+desc&hl=true&version=1&hl.mergeContinuous=true&fl=text&fq=collection:bibleverses&hl.fragsize=100&f.text.hl.alternateField=text&hl.fl=text&rows=2&hl.snippets=3&hl.maxAlternateFieldLength=300&start=540&q=command+ark
I get a result suggestion with text field:
<str name="text">
 That they may put their hope in God and may not forget the works of God: and may seek his commandments.
</str>
And the proposed summary is:
<arr name="text">
<str> <em>commandments</em>. </str>
</arr>
</lst>

Can anyone explain this behavior, tell me if it is a bug, or propose a workaround?
Thank you very much in advance.

Best regards,
Sean Bronée