From 28e91e59962b9e8320e6eba2ea29f6754ccb9422 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Fri, 11 Feb 2022 14:40:21 -0500 Subject: [PATCH 1/2] Shrink slow log for has_child query This removes the defaults from the `toXContent` of the `has_child` query so slow logs that contain it are marginally easier to read. Relates to #76515 --- .../join/query/HasChildQueryBuilder.java | 23 ++++-- .../join/query/HasChildQueryBuilderTests.java | 79 ++++++++++++++++++- 2 files changed, 93 insertions(+), 9 deletions(-) diff --git a/modules/parent-join/src/main/java/org/elasticsearch/join/query/HasChildQueryBuilder.java b/modules/parent-join/src/main/java/org/elasticsearch/join/query/HasChildQueryBuilder.java index 306931fbf8b78..0ec4c0c79c3e0 100644 --- a/modules/parent-join/src/main/java/org/elasticsearch/join/query/HasChildQueryBuilder.java +++ b/modules/parent-join/src/main/java/org/elasticsearch/join/query/HasChildQueryBuilder.java @@ -60,6 +60,7 @@ public class HasChildQueryBuilder extends AbstractQueryBuilder Date: Mon, 14 Feb 2022 13:30:45 -0500 Subject: [PATCH 2/2] Speeling --- .../org/elasticsearch/join/query/HasChildQueryBuilderTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/parent-join/src/test/java/org/elasticsearch/join/query/HasChildQueryBuilderTests.java b/modules/parent-join/src/test/java/org/elasticsearch/join/query/HasChildQueryBuilderTests.java index a362e85c5b599..a36d522cea9da 100644 --- a/modules/parent-join/src/test/java/org/elasticsearch/join/query/HasChildQueryBuilderTests.java +++ b/modules/parent-join/src/test/java/org/elasticsearch/join/query/HasChildQueryBuilderTests.java @@ -247,7 +247,7 @@ public void testFromJson() throws IOException { HasChildQueryBuilder queryBuilder = (HasChildQueryBuilder) parseQuery(query); checkGeneratedJson( /* - * Ignoring unampped is the default and we don't dump it and can't + * Ignoring unmapped is the default and we don't dump it and can't * change it if we're going to use inner_hits. */ query.replaceFirst("\"ignore_unmapped\" : false,", ""),