From ec4ebf31b03248bb4785abe52b88c0a6c9fd378d Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Wed, 6 Apr 2016 22:18:57 +0200 Subject: [PATCH] Revert "test: don't do fuzzy on bool field" This reverts commit 78d2311c5fd502088bd00625956326834538c785. --- .../elasticsearch/index/query/AbstractQueryTestCase.java | 2 -- .../elasticsearch/index/query/MatchQueryBuilderTests.java | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/index/query/AbstractQueryTestCase.java b/core/src/test/java/org/elasticsearch/index/query/AbstractQueryTestCase.java index 8b517fb0a25..228eecebe6d 100644 --- a/core/src/test/java/org/elasticsearch/index/query/AbstractQueryTestCase.java +++ b/core/src/test/java/org/elasticsearch/index/query/AbstractQueryTestCase.java @@ -851,8 +851,6 @@ public abstract class AbstractQueryTestCase> return Fuzziness.build(1 + randomFloat() * 10); case DATE_FIELD_NAME: return Fuzziness.build(randomTimeValue()); - case BOOLEAN_FIELD_NAME: - return null; default: if (randomBoolean()) { return Fuzziness.fromEdits(randomIntBetween(0, 2)); diff --git a/core/src/test/java/org/elasticsearch/index/query/MatchQueryBuilderTests.java b/core/src/test/java/org/elasticsearch/index/query/MatchQueryBuilderTests.java index e5dab227208..f5ce11c4a1d 100644 --- a/core/src/test/java/org/elasticsearch/index/query/MatchQueryBuilderTests.java +++ b/core/src/test/java/org/elasticsearch/index/query/MatchQueryBuilderTests.java @@ -19,8 +19,6 @@ package org.elasticsearch.index.query; -import org.apache.lucene.analysis.core.SimpleAnalyzer; -import org.apache.lucene.index.Term; import org.apache.lucene.queries.ExtendedCommonTermsQuery; import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanQuery; @@ -36,7 +34,6 @@ import org.elasticsearch.common.lucene.search.MultiPhrasePrefixQuery; import org.elasticsearch.common.lucene.search.Queries; import org.elasticsearch.common.unit.Fuzziness; import org.elasticsearch.index.mapper.MappedFieldType; -import org.elasticsearch.index.mapper.core.BooleanFieldMapper; import org.elasticsearch.index.search.MatchQuery; import org.elasticsearch.index.search.MatchQuery.Type; import org.elasticsearch.index.search.MatchQuery.ZeroTermsQuery; @@ -80,10 +77,7 @@ public class MatchQueryBuilderTests extends AbstractQueryTestCase