I understand that arrays are not well supported in ES, but I would like to know the syntax to search for a nested object as below. My current document source contains fields like this:
{
"team": "Lorem",
"cards": [
{
"level": 9,
"id": 26000049
},
{
"level": 7,
"id": 26000036
},
{
"level": 7,
"id": 27000007
},
{
"level": 7,
"elixir": 5
},
{
"level": 9,
"id": 26000041
},
{
"level": 9,
"id": 26000022
},
{
"level": 7,
"id": 26000028
},
{
"level": 9,
"id": 28000008
}
]
}
And I would like to query for specific card id and level. If I do a simple AND, it would match the ID in one object and the level in another object.
Thanks in advance!