From 870a90f11c69d69f217831f5a4c1bc7c0a7917f1 Mon Sep 17 00:00:00 2001 From: Nirmal Chidambaram Date: Thu, 7 Jun 2018 11:15:31 -0500 Subject: [PATCH] has_parent builder: exception message/param fix 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 aca5f4a56d393..4e328ea2c984e 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 @@ -58,7 +58,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));