PUT my_index/_doc/1 { "group": "fans", "user": [ { "first": "Jack", "last": "Smith" }, { "first": "Rose", "last": "White" } ] } PUT my_index { "mappings": { "properties": { "user" : { "type": "nested" } } } } DELETE my_index GET my_index/_search { "query": { "bool": { "must": [ { "match": { "users.first": "Jack" } }, { "match": { "users.last": "White" } } ] } } } GET my_index/_mapping
PUT my_index/_doc/1
{
"group": "fans",
"user": [
{
"first": "Jack",
"last": "Smith"
},
{
"first": "Rose",
"last": "White"
}
]
}PUT my_index
{
"mappings": {
"properties": {
"user" : {
"type": "nested"
}
}
}
}DELETE my_index
GET my_index/_search
{
"query": {
"bool": {
"must": [
{
"match": {
"users.first": "Jack"
}
},
{
"match": {
"users.last": "White"
}
}
]
}
}
}GET my_index/_mapping
{ "took" : 2, "timed_out" : false, "_shards" : { "total" : 1, "successful" : 1, "skipped" : 0, "failed" : 0 }, "hits" : { "total" : { "value" : 0, "relation" : "eq" }, "max_score" : null, "hits" : [ ] } }
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 0,
"relation" : "eq"
},
"max_score" : null,
"hits" : [ ]
}
}