From 5242d3aeb0f5ffcab119710065660455b04ce26f Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Tue, 9 May 2017 16:53:19 -0700 Subject: [PATCH] Fix ids query builder test to use the same logic for matchnodocs as the builder itself --- .../org/elasticsearch/index/query/IdsQueryBuilderTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/index/query/IdsQueryBuilderTests.java b/core/src/test/java/org/elasticsearch/index/query/IdsQueryBuilderTests.java index fa5562474bd..27c1558a7dd 100644 --- a/core/src/test/java/org/elasticsearch/index/query/IdsQueryBuilderTests.java +++ b/core/src/test/java/org/elasticsearch/index/query/IdsQueryBuilderTests.java @@ -74,8 +74,7 @@ public class IdsQueryBuilderTests extends AbstractQueryTestCase @Override protected void doAssertLuceneQuery(IdsQueryBuilder queryBuilder, Query query, SearchContext context) throws IOException { - if (queryBuilder.ids().size() == 0 || queryBuilder.types().length == 0 || - (queryBuilder.types().length == 1 && queryBuilder.types()[0].equals(MetaData.ALL))) { + if (queryBuilder.ids().size() == 0 || context.getQueryShardContext().fieldMapper(UidFieldMapper.NAME) == null) { assertThat(query, instanceOf(MatchNoDocsQuery.class)); } else { assertThat(query, instanceOf(TermInSetQuery.class));