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 19:15:35 GMT
Does this mean that MultiReader doesn't merge the search results and sort
the results as if there was only one index? If not, does it  simply
concatenate the results?

Peter



On 4/11/06, Yonik Seeley <yseeley@gmail.com> wrote:
>
> On 4/11/06, Peter Keegan <peterlkeegan@gmail.com> wrote:
> > Could you explain why an IndexSearcher constructed from multiple readers
> is
> > faster than a MultiSearcher constructed from same readers?
>
> The "convergence layer" is a level lower for a MultiReader vs a
> MultiSearcher.
>
> A MultiReader is an IndexReader, and Queries (Scorers) run directly
> against it since it has efficient TermEnum and TermDocs
> implementations.
>
> A MultiSearcher must do independent searches against subsearchers
> retrieving the top "n" matches, and maintain an additional priority
> queue to merge the results to get the global top "n" matches.  The
> implemetation of createWeight is also heavier (heh..)
>
> I've never measured the performance difference, and it's probably
> relatively small for most queries.
>
> -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