lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aruna Raghavan <>
Subject Boolean AND query
Date Thu, 21 Feb 2002 16:43:36 GMT
Has anyone run into problems with boolean AND query? Basically, I am using
the following code to do the query to look for 
10060 AND 10040

BooleanQuery bq = new BooleanQuery();
Analyzer analyzer = new StandardAnalyzer();
Query query = QueryParser.parse(m_strKeyword, "pageText", analyzer);
 bq.add(query, true, false);

In this case, I am just using one query to add to bq but there can be more. 

I am getting correct results when 10060 AND 10040 exists in the document.
But when one of them does not exist, I am still getting the same results. In
other words, AND seems to be acting like an OR. I noticed this in the latest
RC4 as well as an older lucene build from before lucene joined jakarta.


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

View raw message