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:[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to