lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Keegan" <peterlkee...@gmail.com>
Subject Re: MultiReader and MultiSearcher
Date Tue, 11 Apr 2006 20:21:15 GMT
Oops. I meant to say: Does this mean that an IndexSearcher constructed from
a MultiReader doesn't merge the search results and sort the results as if
there was only one index?

A quick test indicates that it does merge the results properly, however
there is a difference in the order of documents with equal score. The
MultiSearcher returns the higher doc first, but the IndexSearcher returns
the lowest doc first. I think docs of equal score are supposed to be
returned in the order they were indexed (lower doc id first).

Peter




On 4/11/06, Yonik Seeley <yseeley@gmail.com> wrote:
>
> On 4/11/06, Peter Keegan <peterlkeegan@gmail.com> wrote:
> > Does this mean that MultiReader doesn't merge the search results and
> sort
> > the results as if there was only one index?
>
> Correct, it doesn't.  It supports the lower level primitives like
> TermEnum and TermDocs that searches use to run.  A term query is run
> exactly the same way on a MultiReader as it is on a single segment
> IndexReader.  In fact, if you open up an IndexReader on an index with
> multiple segments, it constructs a MultiReader under-the-covers.
>
> -Yonik
> http://incubator.apache.org/solr Solr, The Open Source Lucene Search
> Server
>
> ---------------------------------------------------------------------
> 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