You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Yonik Seeley <ys...@gmail.com> on 2006/03/21 19:08:08 UTC

Re: Multi Search vs reader?

On 3/21/06, Brian <ok...@yahoo.com> wrote:
> I had assumed since I had multiple indexes,
> that meant I need to perform a MultiSearch. However
> several people have mentioned MultiReader. What's the
> difference, and what's the benefit of one over the
> other??

A MultiSearcher can search over Searchables, which can be remote, etc.
A MultiReader is for local indicies.  When you open an IndexReader or
IndexSearcher on a single index with multiple segments, MultiReader is
actually used under the covers.  You can also instantiate a
MultiReader with multiple IndexReaders.

An IndexSearcher with a MultiReader (when you can use it) should be
faster and more efficient than a MultiSearcher across multiple
IndexSearchers.

-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