lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: svn commit: r1384427 - /lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/WildcardQuery.java
Date Thu, 13 Sep 2012 19:26:48 GMT
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: dev@lucene.apache.org
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 <jack@basetechnology.com> 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message