Thanks!

-----Original Message-----
From: Markus Klose [mailto:markus.kl...@shi-gmbh.com] 
Sent: Friday, August 22, 2014 10:16 AM
To: solr-user@lucene.apache.org
Subject: AW: Help Highlight Snippets Score

HI Tomer,

I guess you are looking for a different fragment builder.
There is one called ScoreOrderFragmentsBuilder which probably is not exact what 
you need, but at least it orders the snippets by a score. That should work for 
you

http://wiki.apache.org/solr/HighlightingParameters#hl.fragmentsBuilder


Viele Grüße aus Augsburg

Markus Klose

-----Ursprüngliche Nachricht-----
Von: Tomer Levi [mailto:tomer.l...@nice.com] 
Gesendet: Donnerstag, 21. August 2014 16:49
An: solr-user@lucene.apache.org
Betreff: Help Highlight Snippets Score

Hi,

I have a document with a textual field, I would like to sort the highlighted 
snippets by the number of term occurrences.

For instance, when I have the following snippets:

"Solr Solr Solr"

"Solr Solr"

"Solr Solr Solr Solr"



I would like to get them ordered as:

"Solr Solr Solr Solr"

"Solr Solr Solr"

"Solr Solr"



After I debug the Highlighter I saw that it uses the 
org.apache.lucene.search.highlight.QueryScorer, this scorer gives the same 
score to all the snippets.

*         Is there any other Scorer I can use?

*         How can I set different scorer in solrconfig.xml?



Thanks,

Tomer


Reply via email to