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 liat oren <or...@gmail.com> on 2011/02/14 19:22:37 UTC

Search in multiple indexes which have differnt field name

Hey All,

I try to construct a boolean query that has to run on 3 different set of
indexes:
in two of them, it should query a field name "contents" and in one of them,
it should query a field named "text".
How can I use MultiSearcher to support this structure?

Thanks a lot,
Liat

Re: Search in multiple indexes which have differnt field name

Posted by liat oren <or...@gmail.com>.
Ok, thanks a lot !
I will try that

On 14 February 2011 13:25, Anshum <an...@gmail.com> wrote:

> Hi Liat,
> You could use open a multi/parallelmultisearcher on the indexes that you
> have and then construct an OR query e.g. (contents:A OR text:A)
> I am assuming that the field names do not overlap. If that is not the case
> then you'd need another solution.
>
> --
> Anshum Gupta
> http://ai-cafe.blogspot.com
>
>
> On Mon, Feb 14, 2011 at 11:52 PM, liat oren <or...@gmail.com> wrote:
>
> > Hey All,
> >
> > I try to construct a boolean query that has to run on 3 different set of
> > indexes:
> > in two of them, it should query a field name "contents" and in one of
> them,
> > it should query a field named "text".
> > How can I use MultiSearcher to support this structure?
> >
> > Thanks a lot,
> > Liat
> >
>

Re: Search in multiple indexes which have differnt field name

Posted by Anshum <an...@gmail.com>.
Hi Liat,
You could use open a multi/parallelmultisearcher on the indexes that you
have and then construct an OR query e.g. (contents:A OR text:A)
I am assuming that the field names do not overlap. If that is not the case
then you'd need another solution.

--
Anshum Gupta
http://ai-cafe.blogspot.com


On Mon, Feb 14, 2011 at 11:52 PM, liat oren <or...@gmail.com> wrote:

> Hey All,
>
> I try to construct a boolean query that has to run on 3 different set of
> indexes:
> in two of them, it should query a field name "contents" and in one of them,
> it should query a field named "text".
> How can I use MultiSearcher to support this structure?
>
> Thanks a lot,
> Liat
>