lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: Help with scoring, coordination factor?
Date Thu, 29 Apr 2004 19:37:45 GMT
Matthew W. Bilotti wrote:
> We suspect the coordination term in driving down 
> these documents' ranks and we would like to bring those documents back up 
> to where they should be. 

That sounds right to me.

> Is there a relatively easy way to implement what we want using Lucene?  
> Would it be better to try to supply a Similarity class with a
> special-purpose coord method  [ ... ]

I think this is a good approach.

In 1.4, you can do something like:

public class NoCoordBooleanQuery extends BooleanQuery {

   private static final Similarity SIMILARITY = new DefaultSimilarity {
     public float coord(int overlap, int max) {
       return 1.0f;

   public Similarity getSimilarity(Searcher searcher) {
     return SIMILARITY;


Then use this in place of BooleanQuery when you don't want coordination 
scoring.  I think that should do the trick.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message