lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Pannell <steven.pann...@zooplus.com>
Subject RE: Switching default parsing for Or and AND
Date Tue, 03 Jan 2006 15:40:12 GMT
You can do this, for example:

      QueryParser queryParser = new QueryParser(defaultField, new
StandardAnalyzer());
      queryParser.setOperator(QueryParser.DEFAULT_OPERATOR_AND)



-----Original Message-----
From: Mike Streeton [mailto:mike.streeton@ardentia.co.uk]
Sent: 03 January 2006 12:48
To: java-user@lucene.apache.org
Subject: Switching default parsing for Or and AND


Is there a way of altering the way lucene parses a default string to use
AND instead of OR, e.g. usually "joe bloggs" is executed as "joe OR
bloggs", is there a flag to change this to "joe AND bloggs" which seems
to be the way most search engines work.

 

Thanks

 

Mike


---------------------------------------------------------------------
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