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 Oren Shir <sh...@gmail.com> on 2005/11/20 09:45:27 UTC

reusing MultiSearcher vs. reusing contained IndexSearchers

Hi,
I'm searching several indexes combinations on random. Which method is
better:

1) Keep one IndexSearcher for each index, and create a new MultiSearcher for
each request according to the combination needed.
2) Keep one MultiSearcher with the scope of all the indexes, and pay the
toll of searching irrelevant indexes.
3) Keep each combination of MultiSearchers.

Any other thoughts?

The reason I need this is that the indexes differ in time range of stored
data and scope of content, all of which I know before the query. Should I
step out of the box and just store everything in one huge index? It will
solve this problem, but probably will create a hundred more...

Thanks,
Oren Shir

Re: reusing MultiSearcher vs. reusing contained IndexSearchers

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Oh perhaps create a custom MultiSearcher that requires you specify  
which indexes (by an int[], perhaps?) to search for any given query.

     Erik



On 20 Nov 2005, at 03:45, Oren Shir wrote:

> Hi,
> I'm searching several indexes combinations on random. Which method is
> better:
>
> 1) Keep one IndexSearcher for each index, and create a new  
> MultiSearcher for
> each request according to the combination needed.
> 2) Keep one MultiSearcher with the scope of all the indexes, and  
> pay the
> toll of searching irrelevant indexes.
> 3) Keep each combination of MultiSearchers.
>
> Any other thoughts?
>
> The reason I need this is that the indexes differ in time range of  
> stored
> data and scope of content, all of which I know before the query.  
> Should I
> step out of the box and just store everything in one huge index? It  
> will
> solve this problem, but probably will create a hundred more...
>
> Thanks,
> Oren Shir
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org