lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chuck Williams" <>
Subject RE: Coordination value
Date Thu, 09 Dec 2004 21:41:25 GMT
There is an easier way.  You should use a custom Similarity, which
allows you to define your own coord() method.  Look at DefaultSimilarity
(which specializes Similarity).

I'd suggest analyzing your scores first with explain() to decide what
you really want to tweak.  Just a guess, but your issue might be that
your idf()'s are dominating the score computation.  I had this problem
and change the default idf() to take a final square root, since Lucene
squares that contribution (which is one of its few areas that is
generally not considered best practice).  I also boost the base of the
logarithms on both tf and idf to weight those factors lower.

Good luck,


  > -----Original Message-----
  > From: Jason Haruska []
  > Sent: Thursday, December 09, 2004 1:36 PM
  > To: Lucene Users List
  > Subject: Coordination value
  > I would like to adjust the score lucene is returning to use the
  > coordination component more. For example, I have a BooleanQuery
  > containing three TermQueries. I would like to adjust the score so
  > documents containing all three terms appear first, followed by docs
  > that contain only two of the terms, followed by documents that
  > only one of the terms.
  > I understand that the coordination is a component of the overall
  > document score currently, but I'd like to make it more absolute. I
  > wondering if someone on the list has done something similar.
  > I have implemented a hack that works by adding a function to the
  > BooleanWeight class but it is very slow. I believe it is inefficient
  > because it uses the Explanation class to get the coordination value.
  > There must be an easier way that I'm missing.
  > To unsubscribe, e-mail:
  > For additional commands, e-mail:

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

View raw message