From 77511643ee7da5a51d7fc1bd0dba52e31f748a34 Mon Sep 17 00:00:00 2001 From: javanna Date: Tue, 27 Oct 2015 15:53:59 +0100 Subject: [PATCH] Remove support for min_similarity in fuzzy query Replaced by fuzziness, consistent with other queries. --- .../org/elasticsearch/index/query/FuzzyQueryParser.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/index/query/FuzzyQueryParser.java b/core/src/main/java/org/elasticsearch/index/query/FuzzyQueryParser.java index 340094af7ce..d0094344b0b 100644 --- a/core/src/main/java/org/elasticsearch/index/query/FuzzyQueryParser.java +++ b/core/src/main/java/org/elasticsearch/index/query/FuzzyQueryParser.java @@ -19,16 +19,14 @@ package org.elasticsearch.index.query; -import org.elasticsearch.common.ParseField; import org.elasticsearch.common.ParsingException; import org.elasticsearch.common.unit.Fuzziness; import org.elasticsearch.common.xcontent.XContentParser; + import java.io.IOException; public class FuzzyQueryParser implements QueryParser { - private static final ParseField FUZZINESS = Fuzziness.FIELD.withDeprecation("min_similarity"); - @Override public String[] names() { return new String[]{ FuzzyQueryBuilder.NAME }; @@ -68,7 +66,7 @@ public class FuzzyQueryParser implements QueryParser { value = parser.objectBytes(); } else if ("boost".equals(currentFieldName)) { boost = parser.floatValue(); - } else if (parseContext.parseFieldMatcher().match(currentFieldName, FUZZINESS)) { + } else if (parseContext.parseFieldMatcher().match(currentFieldName, Fuzziness.FIELD)) { fuzziness = Fuzziness.parse(parser); } else if ("prefix_length".equals(currentFieldName) || "prefixLength".equals(currentFieldName)) { prefixLength = parser.intValue();