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 18:52:21 GMT
Technically, should also indicate that backslashes need to be escaped to 
include them in a wildcard term.

-- Jack Krupansky

-----Original Message----- 
From: rmuir@apache.org
Sent: Thursday, September 13, 2012 1:42 PM
To: commits@lucene.apache.org
Subject: svn commit: r1384427 - 
/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/WildcardQuery.java

Author: rmuir
Date: Thu Sep 13 17:42:18 2012
New Revision: 1384427

URL: http://svn.apache.org/viewvc?rev=1384427&view=rev
Log:
add note about escaping terms

Modified:
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/WildcardQuery.java

Modified: 
lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/WildcardQuery.java
URL: 
http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/WildcardQuery.java?rev=1384427&r1=1384426&r2=1384427&view=diff
==============================================================================
---  
lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/WildcardQuery.java 
(original)
+++ 
lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/WildcardQuery.java 
Thu Sep 13 17:42:18 2012
@@ -28,7 +28,10 @@ import java.util.List;

/** Implements the wildcard search query. Supported wildcards are 
<code>*</code>, which
  * matches any character sequence (including the empty one), and 
<code>?</code>,
- * which matches any single character. Note this query can be slow, as it
+ * which matches any single character. If you want to treat a wildcard as a 
literal
+ * character instead, escape it with '\'.
+ * <p>
+ * Note this query can be slow, as it
  * needs to iterate over many terms. In order to prevent extremely slow 
WildcardQueries,
  * a Wildcard term should not start with the wildcard <code>*</code>
  *


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


Mime
View raw message