Technically, should also indicate that backslashes need to be escaped to include them in a wildcard term.

-- Jack Krupansky

-----Original Message----- From: [email protected]
Sent: Thursday, September 13, 2012 1:42 PM
To: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to