lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Iulius Curt <>
Subject [QueryParser] Omit escaped special characters
Date Wed, 18 Apr 2012 19:15:17 GMT
Hi, guys.

Why is it OK for the QueryParser to omit escaped special chars? Or isn't it?
What I'm trying to say is that the escaped char is replaced with whitespace
instead of being literally passed.

I try to understand why this happens. Is it because of the Analyzer or
because of the Parser?
Here are some tests using StandardAnalyzer and QueryParser (trunk version)
to illustrate:

f:foo-bar --> f:foo f:bar
f:"foo-bar" --> f:"foo bar"
f:"foo\-bar" --> f:"foo bar"
f:"foo\+bar" --> f:"foo bar"
f:"foo\!bar" --> f:"foo bar"

temp:70 --> temp:70
temp:\-70 --> temp:70
temp:"-70" --> temp:70

\(1\+1\)\:2 --> defaultfield:1 defaultfield:1 defaultfield:2
"\(1\+1\)\:2" --> defaultfield:"1 1 2"

This (not sure if) issue is somehow related to LUCENE-2916 [1]



View raw message