You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2012/09/13 21:02:25 UTC

svn commit: r1384473 - /lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/FuzzyQuery.java

Author: rmuir
Date: Thu Sep 13 19:02:24 2012
New Revision: 1384473

URL: http://svn.apache.org/viewvc?rev=1384473&view=rev
Log:
improve fuzzyquery javadocs

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

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/FuzzyQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/FuzzyQuery.java?rev=1384473&r1=1384472&r2=1384473&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/FuzzyQuery.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/FuzzyQuery.java Thu Sep 13 19:02:24 2012
@@ -28,12 +28,21 @@ import org.apache.lucene.util.ToStringUt
 import org.apache.lucene.util.automaton.LevenshteinAutomata;
 
 /** Implements the fuzzy search query. The similarity measurement
- * is based on the Damerau-Levenshtein (optimal string alignment) algorithm.
+ * is based on the Damerau-Levenshtein (optimal string alignment) algorithm,
+ * though you can explicitly choose classic Levenshtein by passing <code>false</code>
+ * to the <code>transpositions</code> parameter.
  * 
  * <p>This query uses {@link MultiTermQuery.TopTermsScoringBooleanQueryRewrite}
  * as default. So terms will be collected and scored according to their
  * edit distance. Only the top terms are used for building the {@link BooleanQuery}.
  * It is not recommended to change the rewrite mode for fuzzy queries.
+ * 
+ * <p>At most, this query will match terms up to 
+ * {@value org.apache.lucene.util.automaton.LevenshteinAutomata#MAXIMUM_SUPPORTED_DISTANCE} edits. 
+ * Higher distances (especially with transpositions enabled), are generally not useful and 
+ * will match a significant amount of the term dictionary. If you really want this, consider
+ * using an n-gram indexing technique (such as the SpellChecker in the 
+ * <a href="{@docRoot}/../suggest/overview-summary.html">suggest module</a>) instead.
  */
 public class FuzzyQuery extends MultiTermQuery {