lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter W." <pe...@marketingbrokers.com>
Subject Re: In memory MultiSearcher
Date Tue, 22 May 2007 21:52:18 GMT
Hoss,

My Lucene scaling strategy involves creating
numerous indexes, so I was looking for a way
to read them in together for quickness.

For those interested, your suggestion of using a
single IndexSearcher on a MultiReader works well
by itself.

Or, you can still place in memory like this:

IndexReader[] indexr_a=
            {
            IndexReader.open(new RAMDirectory(index_one_path)),
            IndexReader.open(new RAMDirectory(index_two_path)),
            IndexReader.open(new RAMDirectory(index_three_path)),
            IndexReader.open(new RAMDirectory(index_n_path))
            };

          MultiReader mr=new MultiReader(indexr_a);
          IndexSearcher is=new IndexSearcher(mr);

Regards,

Peter W.



On May 22, 2007, at 1:10 AM, Chris Hostetter wrote:

> ...and if you are "Multi Searching" over a bunch of local directories
> anyway, then use a single INdexSearcher on a MultiReader instead ...
> that should be much faster then youre MultiSearcher.

---------------------------------------------------------------------
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