From 61802697378783e24bc5b1e1d5d006b2b978681d Mon Sep 17 00:00:00 2001 From: Nirmal Chidambaram Date: Sat, 30 Jun 2018 18:17:37 +0000 Subject: [PATCH] has_parent builder: exception message/param fix (#31182) has_parent builder throws exception message that it expects a `type` while parser excepts `parent_type` --- .../join/query/HasParentQueryBuilder.java | 10 +++++----- .../join/query/HasParentQueryBuilderTests.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/parent-join/src/main/java/org/elasticsearch/join/query/HasParentQueryBuilder.java b/modules/parent-join/src/main/java/org/elasticsearch/join/query/HasParentQueryBuilder.java index 5e2dd4206f2f7..9d979d149d502 100644 --- a/modules/parent-join/src/main/java/org/elasticsearch/join/query/HasParentQueryBuilder.java +++ b/modules/parent-join/src/main/java/org/elasticsearch/join/query/HasParentQueryBuilder.java @@ -64,7 +64,7 @@ public class HasParentQueryBuilder extends AbstractQueryBuilder hasParentQuery(null, query, false)); - assertThat(e.getMessage(), equalTo("[has_parent] requires 'type' field")); + assertThat(e.getMessage(), equalTo("[has_parent] requires 'parent_type' field")); e = expectThrows(IllegalArgumentException.class, () -> hasParentQuery("foo", null, false));