Revert "test: don't do fuzzy on bool field"

This reverts commit 78d2311c5f.
This commit is contained in:
Martijn van Groningen 2016-04-06 22:18:57 +02:00
parent 5ff68d173d
commit ec4ebf31b0
2 changed files with 1 additions and 9 deletions

View File

@ -851,8 +851,6 @@ public abstract class AbstractQueryTestCase<QB extends AbstractQueryBuilder<QB>>
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));

View File

@ -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<MatchQueryBuil
}
if (randomBoolean()) {
Fuzziness fuzziness = randomFuzziness(fieldName);
if (fuzziness != null) {
matchQuery.fuzziness();
}
matchQuery.fuzziness(randomFuzziness(fieldName));
}
if (randomBoolean()) {