Revert "test: don't do fuzzy on bool field"
This reverts commit 78d2311c5f
.
This commit is contained in:
parent
5ff68d173d
commit
ec4ebf31b0
|
@ -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));
|
||||
|
|
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue