diff --git a/core/src/main/java/org/elasticsearch/search/fetch/innerhits/InnerHitsParseElement.java b/core/src/main/java/org/elasticsearch/search/fetch/innerhits/InnerHitsParseElement.java index d4871b6ab72..8fe2fba2e0f 100644 --- a/core/src/main/java/org/elasticsearch/search/fetch/innerhits/InnerHitsParseElement.java +++ b/core/src/main/java/org/elasticsearch/search/fetch/innerhits/InnerHitsParseElement.java @@ -158,7 +158,7 @@ public class InnerHitsParseElement implements SearchParseElement { if (objectMapper == null) { throw new IllegalArgumentException("path [" + nestedPath +"] doesn't exist"); } - if (!objectMapper.nested().isNested()) { + if (objectMapper.nested().isNested() == false) { throw new IllegalArgumentException("path [" + nestedPath +"] isn't nested"); } ObjectMapper parentObjectMapper = parseContext.nestedScope().nextLevel(objectMapper);