You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Stas Chetvertkov <sc...@oilspace.com> on 2002/10/21 13:16:06 UTC

Problem with document scoring when using MultiSearcher

Hi All,

I am using MultiSearcher to search in 2 indexes having identical structure.
Those indexes have indexed untokenized field, by which I am trying to
perform a search using a simple TermQuery.

The problem that I encountered is that in the case of performing 2 separate
searches for these indexes scores of all found documents are 1 (which is
correct), but when performing search using MultiSearcher, results originated
from the 1st index have scores equal to 1, but results from the 2nd have
much less fractional scores (I am getting something like 0.22).

Seems that the cause of the problem is that TermQuery's weight parameter is
initialized twice (once for each IndexSearcher) with different values, so
that the scores of documents found in the 1st index have completely
different order than scores of the 2nd index. Consequence of this is that
normalization procedure in Hits.getMoreDocs screws up the scores of
documents from the second index.

Did anyone meet this problem? Any suggestions for dealing with it would be
really helpful for us.

Regards,
Stas.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problem with document scoring when using MultiSearcher

Posted by Doug Cutting <cu...@lucene.com>.
Stas,

I just found your message while going through old mail.

Have you tried this recently, with the latest sources from CVS?  I think 
this will be fixed in the 1.3 release, but it would be great to have you 
verify this before we make the release.

Thanks,

Doug

Stas Chetvertkov wrote:
> Hi All,
> 
> I am using MultiSearcher to search in 2 indexes having identical structure.
> Those indexes have indexed untokenized field, by which I am trying to
> perform a search using a simple TermQuery.
> 
> The problem that I encountered is that in the case of performing 2 separate
> searches for these indexes scores of all found documents are 1 (which is
> correct), but when performing search using MultiSearcher, results originated
> from the 1st index have scores equal to 1, but results from the 2nd have
> much less fractional scores (I am getting something like 0.22).
> 
> Seems that the cause of the problem is that TermQuery's weight parameter is
> initialized twice (once for each IndexSearcher) with different values, so
> that the scores of documents found in the 1st index have completely
> different order than scores of the 2nd index. Consequence of this is that
> normalization procedure in Hits.getMoreDocs screws up the scores of
> documents from the second index.
> 
> Did anyone meet this problem? Any suggestions for dealing with it would be
> really helpful for us.
> 
> Regards,
> Stas.
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org