lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Condit <con...@sdsc.edu>
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
query)...
Can I escape boolean keywords somehow?

Here's a runnable example: http://www.pastie.org/1564773

Thanks,
-Chris

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