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 Cam Bazz <ca...@gmail.com> on 2008/07/09 07:37:32 UTC

boolean query or

Hello,

Is it possible to make a boolean query where a word is equal to fieldA or
fieldB?

in other words, I like to search a word in two fields, if word passes in
fieldA or fieldB, then it is a hit.

Best,
-C.B.

Re: boolean query or

Posted by Karl Wettin <ka...@gmail.com>.
9 jul 2008 kl. 07.37 skrev Cam Bazz:

> Hello,
>
> Is it possible to make a boolean query where a word is equal to  
> fieldA or
> fieldB?
>
> in other words, I like to search a word in two fields, if word  
> passes in
> fieldA or fieldB, then it is a hit.

XOR?

+(A B) -(+A +B)


        karl

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