lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Strange change to query parser behaviour in recent versions
Date Fri, 19 Aug 2011 01:05:54 GMT

See LUCENE-2458 for the backstory.

the argument was that while phrase queries were historicly generated by 
the query parser when a single (white space deliminated) "chunk" of query 
parser input produced multiple tokens, that logic didn't make sense in CJK 
type langauges where whitespace is not semanticly meaning full to seperate 

As i understand it: both [[ 限 定 ]] and [[ 限定 ]] should be treated 
equivilently in asian langauges, so they *both* become BooleanQueries for 
those two words (using the default query operator)

I don't neccessarily agree with the fact that the default was changed, but 
(unless i'm completley missing something) it was changed in a way that 
should be back compatible if you use a consistent Version param on your 
QueryParser instance.

: 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
: workaround?
: TX
: ---------------------------------------------------------------------
: To unsubscribe, e-mail:
: For additional commands, e-mail:


View raw message