#26145 Fix test expectation with MatchNoDocsQuery
This commit is contained in:
parent
f3d109bad2
commit
8fd71a5d6d
|
@ -260,7 +260,9 @@ public class SimpleQueryStringBuilderTests extends AbstractQueryTestCase<SimpleQ
|
|||
}
|
||||
} else if (queryBuilder.fields().size() == 1) {
|
||||
Map.Entry<String, Float> field = queryBuilder.fields().entrySet().iterator().next();
|
||||
if (query instanceof MatchNoDocsQuery == false) {
|
||||
assertTermOrBoostQuery(query, field.getKey(), queryBuilder.value(), field.getValue());
|
||||
}
|
||||
} else if (queryBuilder.fields().size() == 0) {
|
||||
assertThat(query, either(instanceOf(DisjunctionMaxQuery.class)).or(instanceOf(MatchNoDocsQuery.class)));
|
||||
if (query instanceof DisjunctionMaxQuery) {
|
||||
|
|
Loading…
Reference in New Issue