The idf's are indeed computed locally, but I believe it is a simple bug in 
MultiSearcher.  The attached version of the test adds explain()'s to verify the 
problem is the idf's (and changes the Field construction to something that works in my 
1.4.2 sources).

MultiSearcher.search() calls the separate searchers for each index.  That makes the 
IndexSearcher the current searcher when Similarity.idf() is reached.  Thus 
IndexSearcher.docFreq() is used instead of MultiSearcher.docFreq(), yielding the 
index-local idf's.

The best fix is not obvious to me, but it is just a code-structure issue.

Chuck

  > -----Original Message-----
  > From: Daniel Naber [mailto:[EMAIL PROTECTED]
  > Sent: Thursday, October 21, 2004 2:35 PM
  > To: Lucene Developers List
  > Subject: Re: Normalized Scoring -- was RE: idf and explain(), was Re:
  > Search and Scoring
  > 
  > On Thursday 21 October 2004 23:03, Doug Cutting wrote:
  > 
  > > Idf's are already computed globally across all indexes.  Tf's are
  > local
  > > to the document.  In short, scores from a MultiSearcher are the same
  > as
  > > when searching an IndexReader with the same documents.
  > 
  > That doesn't seem to be the case in the attached test -- am I using
  > MultiSearcher in the wrong way or what might be the problem?
  > The output of the attached test is:
  > 
  > 1+2 searched with Multisearcher:
  > two blah three score=0.70273256
  > one blah three score=0.35615897
  > one foo three score=0.35615897
  > one foobar three score=0.35615897
  > 
  > 1+2 indexed together:
  > one blah three score=0.5911608
  > one foo three score=0.5911608
  > one foobar three score=0.5911608
  > two blah three score=0.5911608
  > 
  > --
  > http://www.danielnaber.de

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

Reply via email to