From 08f86a018f0216b42774085932059b7c14d4df44 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 13 Sep 2012 17:42:18 +0000 Subject: [PATCH] add note about escaping terms git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1384427 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/java/org/apache/lucene/search/WildcardQuery.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lucene/core/src/java/org/apache/lucene/search/WildcardQuery.java b/lucene/core/src/java/org/apache/lucene/search/WildcardQuery.java index 1a041ebb5d1..97683c6cbc8 100644 --- a/lucene/core/src/java/org/apache/lucene/search/WildcardQuery.java +++ b/lucene/core/src/java/org/apache/lucene/search/WildcardQuery.java @@ -28,7 +28,10 @@ import java.util.List; /** Implements the wildcard search query. Supported wildcards are *, which * matches any character sequence (including the empty one), and ?, - * 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 '\'. + *

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