lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Condit <>
Subject Phrase query with boolean matches
Date Tue, 15 Feb 2011 00:54:23 GMT
I'm trying to use the QueryParser in 3.0.2 to make "foo and bar" (with
the quotes) return documents with the exact phrase "foo and bar". When I
run it through the QueryParser (with a StandardAnalyzer) I end up with
"foo ? bar", which doesn't match the documents in the index. I know that
"and" is a stop word, but I'm curious why it's translated into ? instead
of a * during this parsing (or just left along because it's a phrase
Can I escape boolean keywords somehow?

Here's a runnable example:


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

View raw message