On 4/11/06, Peter Keegan <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to