lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liat oren <oren.l...@gmail.com>
Subject Re: Merging results from two searches on two separate Searchers
Date Wed, 15 Feb 2012 01:26:57 GMT
Thanks a lot!
Liat

On 14 February 2012 20:06, Uwe Schindler <uwe@thetaphi.de> wrote:

> Hi,
>
> To merge TopDocs with "compatible scores", you can use the new Lucene
> (since 3.3) method: TopDocs.merge(). Just execute the query on different
> indexes with same topdocs count and execute this method.
>
> Uwe
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
>
> > -----Original Message-----
> > From: Trejkaz [mailto:trejkaz@trypticon.org]
> > Sent: Wednesday, February 15, 2012 1:57 AM
> > To: java-user@lucene.apache.org
> > Subject: Re: Merging results from two searches on two separate Searchers
> >
> > On Wed, Feb 15, 2012 at 11:46 AM, Uwe Schindler <uwe@thetaphi.de> wrote:
> > > Scores are only compatible if the query is the same, which is not the
> case for
> > you.
> > > So you cannot merge hits from different queries.
> >
> > So I guess in the case where the different query parsers happen to
> generate the
> > same query, it's safe to do then. This is actually much better than I was
> > expecting. :)
> >
> > Which leaves the (hopefully rarer) case of them generating
> actually-different
> > queries.
> >
> > I assume the cause for the incompatibility is something like this:
> >
> >   User's query: "cats"
> >   Suppose query parser 1 converts to "text:cats"
> >   Suppose query parser 2 converts to "text:cat"
> >
> > Because query parser 2 is converting "cat" -> "cat" as well as "cats"
> > -> "cat", this affects the doc frequency of "cat", which as a result
> > affects the score.
> >
> > But of course we want all the results in one list at the end, so we have
> to merge
> > it *somehow*. So I was wondering that if the score by itself is not
> enough,
> > maybe there is some way to weight it so that it can be merged again.
> >
> > TX
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message