Searching multiple indexes

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Searching multiple indexes

spring
Hi,

I have some questions about searching multiple indexes.

1. IndexSearcher with a MultiReader will search the indexes sequentially?

2. ParallelMultiSearcher searches in parallel. How is this done? One thread
per index? When will it return? When the slowest search is fineshed?

3. When I have to search indexes created with different analyzers (maybe a
french and a german analyzer), I have to search them separately by my own?

Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Searching multiple indexes

spring
No ideas? :(

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: Samstag, 16. Februar 2008 15:42
> To: [hidden email]
> Subject: Searching multiple indexes
>
> Hi,
>
> I have some questions about searching multiple indexes.
>
> 1. IndexSearcher with a MultiReader will search the indexes
> sequentially?
>
> 2. ParallelMultiSearcher searches in parallel. How is this
> done? One thread
> per index? When will it return? When the slowest search is fineshed?
>
> 3. When I have to search indexes created with different
> analyzers (maybe a
> french and a german analyzer), I have to search them
> separately by my own?
>
> Thank you.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Searching multiple indexes

Cedric Ho
> > I have some questions about searching multiple indexes.
> >
> > 1. IndexSearcher with a MultiReader will search the indexes
> > sequentially?

I think need to use either MultiSearcher or ParallelMultiSearcher

> >
> > 2. ParallelMultiSearcher searches in parallel. How is this
> > done? One thread
> > per index? When will it return? When the slowest search is fineshed?

Yes and Yes I think.

> >
> > 3. When I have to search indexes created with different
> > analyzers (maybe a
> > french and a german analyzer), I have to search them
> > separately by my own?

Yes =)

> >
> > Thank you.


Regards,
Cedric

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Searching multiple indexes

Daniel Noll-3-2
In reply to this post by spring
On Tuesday 19 February 2008 21:08:59 [hidden email] wrote:
> 1. IndexSearcher with a MultiReader will search the indexes
> sequentially?

Not exactly.  It will fuse the indexes together such that things like TermEnum
will merge the ones from the real indexes, and will search using those
composite enumerations.

> 2. ParallelMultiSearcher searches in parallel. How is this
> done? One thread per index?
> When will it return? When the slowest search is fineshed?

That's what the code seems to indicate.

> 3. When I have to search indexes created with different
> analyzers (maybe a french and a german analyzer), I have to search them
> separately by my own?

Different analysers means a different query parser for each index.  If the
resulting Query object is the same for all indexes though, there's no
problem.  The problem occurs when the query does get rewritten by a filter.

That being said, doing a parse query / search in parallel isn't exactly
difficult.  Look at how ParallelMultiSearcher does it and copy it.

Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]