From 235cb476d9dc3852b4eebb6883b5f5ddb8b32fa3 Mon Sep 17 00:00:00 2001 From: Aaron Johnson Date: Tue, 31 May 2016 17:03:54 -0400 Subject: [PATCH] Fix drunken indentation. (#497) * Fix drunken indentation. * Fix more drunken indentation. --- 402_Nested/32_Nested_query.asciidoc | 52 +++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/402_Nested/32_Nested_query.asciidoc b/402_Nested/32_Nested_query.asciidoc index 54c7d7702..d680ceb7a 100644 --- a/402_Nested/32_Nested_query.asciidoc +++ b/402_Nested/32_Nested_query.asciidoc @@ -12,17 +12,32 @@ GET /my_index/blogpost/_search "query": { "bool": { "must": [ - { "match": { "title": "eggs" }}, <1> + { + "match": { + "title": "eggs" <1> + } + }, { "nested": { "path": "comments", <2> "query": { "bool": { "must": [ <3> - { "match": { "comments.name": "john" }}, - { "match": { "comments.age": 28 }} + { + "match": { + "comments.name": "john" + } + }, + { + "match": { + "comments.age": 28 + } + } ] - }}}} + } + } + } + } ] }}} -------------------------- @@ -58,20 +73,37 @@ GET /my_index/blogpost/_search "query": { "bool": { "must": [ - { "match": { "title": "eggs" }}, + { + "match": { + "title": "eggs" + } + }, { "nested": { - "path": "comments", + "path": "comments", "score_mode": "max", <1> "query": { "bool": { "must": [ - { "match": { "comments.name": "john" }}, - { "match": { "comments.age": 28 }} + { + "match": { + "comments.name": "john" + } + }, + { + "match": { + "comments.age": 28 + } + } ] - }}}} + } + } + } + } ] -}}} + } + } +} -------------------------- <1> Give the root document the `_score` from the best-matching nested document.