lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Schima <...@foraker.com>
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);


Thanks!
Frank


-- 
View this message in context: http://www.nabble.com/Search-with-AND-by-default-tf3909294.html#a11084504
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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