diff --git a/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java b/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java index 310ffff3007..63378baa721 100644 --- a/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java +++ b/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java @@ -2471,7 +2471,7 @@ public class HighlighterSearchIT extends ESIntegTestCase { logger.info("--> highlighting and searching on field1"); SearchSourceBuilder source = searchSource().query(boolQuery() - .should(boolQuery().mustNot(constantScoreQuery(QueryBuilders.existsQuery("field1")))) + .should(boolQuery().mustNot(QueryBuilders.existsQuery("field1"))) .should(matchQuery("field1", "test")) .should(constantScoreQuery(queryStringQuery("field1:photo*")))) .highlighter(highlight().field("field1")); diff --git a/core/src/test/java/org/elasticsearch/search/query/ExistsIT.java b/core/src/test/java/org/elasticsearch/search/query/ExistsIT.java index ae1f7ac5aa4..73906b2ed83 100644 --- a/core/src/test/java/org/elasticsearch/search/query/ExistsIT.java +++ b/core/src/test/java/org/elasticsearch/search/query/ExistsIT.java @@ -57,44 +57,44 @@ public class ExistsIT extends ESIntegTestCase { public void testExists() throws Exception { XContentBuilder mapping = XContentBuilder.builder(JsonXContent.jsonXContent) - .startObject() + .startObject() .startObject("type") - .startObject(FieldNamesFieldMapper.NAME) - .field("enabled", randomBoolean()) + .startObject(FieldNamesFieldMapper.NAME) + .field("enabled", randomBoolean()) + .endObject() + .startObject("properties") + .startObject("foo") + .field("type", "string") + .endObject() + .startObject("bar") + .field("type", "object") + .startObject("properties") + .startObject("foo") + .field("type", "string") + .endObject() + .startObject("bar") + .field("type", "object") + .startObject("properties") + .startObject("bar") + .field("type", "string") + .endObject() + .endObject() + .endObject() + .startObject("baz") + .field("type", "long") + .endObject() + .endObject() + .endObject() + .endObject() .endObject() - .startObject("properties") - .startObject("foo") - .field("type", "string") - .endObject() - .startObject("bar") - .field("type", "object") - .startObject("properties") - .startObject("foo") - .field("type", "string") - .endObject() - .startObject("bar") - .field("type", "object") - .startObject("properties") - .startObject("bar") - .field("type", "string") - .endObject() - .endObject() - .endObject() - .startObject("baz") - .field("type", "long") - .endObject() - .endObject() - .endObject() - .endObject() - .endObject() - .endObject(); + .endObject(); assertAcked(client().admin().indices().prepareCreate("idx").addMapping("type", mapping)); @SuppressWarnings("unchecked") Map barObject = new HashMap<>(); barObject.put("foo", "bar"); barObject.put("bar", singletonMap("bar", "foo")); - final Map[] sources = new Map[]{ + final Map[] sources = new Map[] { // simple property singletonMap("foo", "bar"), // object fields