Skip to content

Commit

Permalink
Fix drunken indentation. (elastic#497)
Browse files Browse the repository at this point in the history
* Fix drunken indentation.

* Fix more drunken indentation.
  • Loading branch information
aejnsn authored and polyfractal committed May 31, 2016
1 parent 035ce3c commit 235cb47
Showing 1 changed file with 42 additions and 10 deletions.
52 changes: 42 additions & 10 deletions 402_Nested/32_Nested_query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
]
}}}}
}
}
}
}
]
}}}
--------------------------
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 235cb47

Please sign in to comment.