lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Davis <jada...@gmail.com>
Subject QueryParser handling of backslash characters
Date Tue, 19 Jul 2005 15:19:51 GMT
Hi,

I'm seeing some strange behavior in the way the QueryParser handles
consecutive backslash characters.  I know that backslash is the escape
character in Lucene, and so I would expect "\\\\" to match fields that
have two consecutive backslashes, but this does not seem to be the
case.

The fields I'm searching are UNC paths, e.g. "\\192.168.0.15\public". 
The only way I can get my query to find the record containing that
value is to type "FieldName:\\\192.168.0.15\\public" (three slashes). 
Why is the third backslash character not treated as an escape?  Is it
just that any backslash that is preceded by a backslash is interpreted
as a literal backslash character, regardless of whether the "escape"
backslash was itself escaped?

I can code around this, but it seems inconsistent with the way that
escape characters usually work.  Is this a bug, or is it intentional,
or am I missing something?

Thanks,
Jeff

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