lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: accessing the query string from inside TokenFilter
Date Sat, 29 Oct 2011 20:27:46 GMT

: The bug is that QueryParser tries to be a Tokenizer and breaks on whitespace.
: Allowing tokenizer access to the query string would just mean that

Calling this a bug in the QUeryParser is grossly missleading -- it's like 
saying that QueryParser is buggy because it does parsing on whitespace 
characters is like saying it's buggy because it doesn't treat + and - as 
literal input characters.

whitespace characters (and +, and -, and quotes, and parens, etc...) that 
are not quoted or escaped are syntactically meaningful markup characters 
to the QueryParser -- they instruct the query parser where one clause of a 
boolean query ends and another clause begins.

if this isn't the parsing behavior that you want, then either escape the 
whitespace characters, or don't use the Lucene QueryParser -- use some 
other parser that doesn't have meta characters.


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

View raw message