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 Chris Hostetter <ho...@fucit.org> on 2013/03/26 19:32:15 UTC

Re: Query question

: So as I said, the search result I want is the one with the highest score,
: but I was hoping to find a way to boost the score based on the number of
: terms it finds (or matches well) so that I can differentiate between a close
: match and nowhere near. Any suggestions?

In general, this already happens because of the "coord" factor 
of your query -- the more optional (ie: "SHOULD") clauses of a 
BooleanQuery that match a document, the higher the score.

If you aren't happy with how much of an impact the coord factor has on 
your score (vs things like the term freq) you can customize your 
similarity -- take a look at the debug=true output to see how the scores 
are built up for each doc to decide for yourself.


-Hoss