lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <ysee...@gmail.com>
Subject Re: MultiReader and MultiSearcher
Date Tue, 11 Apr 2006 15:10:08 GMT
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
View raw message