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,

Chuck

  > -----Original Message-----
  > From: Jason Haruska [mailto:[EMAIL PROTECTED]
  > 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
that
  > documents containing all three terms appear first, followed by docs
  > that contain only two of the terms, followed by documents that
contain
  > 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
was
  > 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: [EMAIL PROTECTED]
  > For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to