lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Schima <>
Subject Search with AND by default
Date Tue, 12 Jun 2007 18:45:07 GMT

I'm searching my index and if a user types multiple words (e.g. "two words")
in the search field, I want both of the search terms to appear in the
resulting hits, but it appears to be doing an OR by default. How can I get
an AND by default instead?

Here's how i create my Search:

QueryParser qp = new MultiFieldQueryParser( new String[] {"content",
"content_title"}, new StandardAnalyzer() );
Query query = qp.parse(strTerms);


View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message