lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Iain Willis" <iain.wil...@ardentia.co.uk>
Subject RE: Changing default QueryParser operator from OR to AND
Date Fri, 10 Feb 2006 11:58:08 GMT
Hi,

Instead of using the static parse() method of QueryParser, you will need
to create a new instance, and the call
setOperator(DEFAULT_OPERATOR_AND);

Iain

www.ardentia.com the home of NetSearch



-----Original Message-----
From: Tim.Wright@informa.com [mailto:Tim.Wright@informa.com] 
Sent: 10 February 2006 11:38
To: java-user@lucene.apache.org
Subject: 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


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


Mime
View raw message