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 Ti...@informa.com on 2006/02/10 12:37:49 UTC

Changing default QueryParser operator from OR to AND

Hi guys, 

IF QueryParser gets a phrase with a number of words (ie: "here are
words") it uses the implicit operator OR - "here OR are OR words". LIA
on p94 says the operator "by default is OR", implying that there may be
some way to change this. 

We'd really like the default to be AND. Is that possible?

Cheers,

Tim.
--------------------------------------------------------------------------------------------------------------------------------------------
The information contained in this email message may be confidential. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. Although this message and any attachments are believed to be free of viruses, no responsibility is accepted by Informa for any loss or damage arising in any way from receipt or use thereof.  Messages to and from the company are monitored for operational reasons and in accordance with lawful business practices. 
If you have received this message in error, please notify us by return and delete the message and any attachments.  Further enquiries/returns can be sent to postmaster@informa.com

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


Re: Changing default QueryParser operator from OR to AND

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Feb 10, 2006, at 4:37 AM, <Ti...@informa.com>  
<Ti...@informa.com> wrote:
> IF QueryParser gets a phrase with a number of words (ie: "here are
> words") it uses the implicit operator OR - "here OR are OR words". LIA
> on p94 says the operator "by default is OR", implying that there  
> may be
> some way to change this.
>
> We'd really like the default to be AND. Is that possible?

Are you feeling lucky?!  :)

	<http://www.lucenebook.com/search?query=QueryParser+default+operator>

Hit #1, answer pretty distillable even from the brief snippet.

	Erik


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