Fix inaccurate docs for nested datatype

Closes #15436
This commit is contained in:
umeku 2015-12-15 13:44:58 +02:00 committed by Clinton Gormley
parent c7bcb32ae6
commit 0ce88b5887
1 changed files with 4 additions and 4 deletions

View File

@ -110,7 +110,7 @@ GET my_index/_search
"bool": {
"must": [
{ "match": { "user.first": "Alice" }},
{ "match": { "user.last": "White" }} <2>
{ "match": { "user.last": "Smith" }} <2>
]
}
}
@ -127,7 +127,7 @@ GET my_index/_search
"bool": {
"must": [
{ "match": { "user.first": "Alice" }},
{ "match": { "user.last": "Smith" }} <3>
{ "match": { "user.last": "White" }} <3>
]
}
},
@ -137,14 +137,14 @@ GET my_index/_search
"user.first": {}
}
}
}
}
}
}
--------------------------------------------------
// AUTOSENSE
<1> The `user` field is mapped as type `nested` instead of type `object`.
<2> This query doesn't match because `Alice` and `White` are not in the same nested object.
<2> This query doesn't match because `Alice` and `Smith` are not in the same nested object.
<3> This query matches because `Alice` and `White` are in the same nested object.
<4> `inner_hits` allow us to highlight the matching nested documents.