Good enough.

The reason I stumbled into this was for the user-reported case of parsing "*\:*" (without quotes). The escape is needed at the query parser level so that it doesn't look like a field reference, but the escape gets passed down into WildcardQuery itself. It is a useless escape down at that level, but there nonetheless. I was initially surprised when debugQuery in Solr showed the backslash in the parsed query; normally escapes get thrown away by the query parser before the query is generated, but not since wild escaping was added.

-- Jack Krupansky

-----Original Message----- From: Robert Muir
Sent: Thursday, September 13, 2012 3:18 PM
To: [email protected]
Subject: Re: svn commit: r1384427 - /lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/WildcardQuery.java

On Thu, Sep 13, 2012 at 3:15 PM, Jack Krupansky <[email protected]> wrote:

So, if the user wants a backslash in their wildcard term, it does need to be
escaped. I think. If I am wrong, please explain further.


its not necessary if its at the end (its lenient). Anyway I'll just
change it to say '\' is the escape character.

I want to keep it concise: most people dont have these characters in
their terms.

--
lucidworks.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to