lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <>
Subject Strange change to query parser behaviour in recent versions
Date Wed, 17 Aug 2011 21:40:45 GMT
Hi all.

Suppose I am searching for - 限定

In 3.0, QueryParser would parse this as a phrase query.  In 3.3, it
parses it as a boolean query, but offers an option to treat it like a
phrase.  Why would the default be not to do this?  Surely you would
always want it to become a phrase query.

The new parser (StandardQueryParser) parses it as a boolean query
also, and this is where I actually noticed the change (I noticed the
change in QueryParser when I tried to make a code example to show the
difference between the two.)  Is there an equivalent setting to make
it generate a phrase query instead?  Curently I am working around this
by inserting a QueryNodeProcessor which converts all unquoted field
queries to quoted queries.

Since we claim to support multiple language, if there is a good reason
for this *not* to be a phrase query, maybe I shouldn't be doing this


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

View raw message