Reputation: 1865
Given a document like this:
{
"id": "12345",
"elements": [
{
"type": "configure",
"time": 3000
}
]
}
Is it possible to query for documents with an object in the elements array that have a type
of configure
and then also retrieve that specific object in the array so that I can also get the time
value associated with that element (In this case 3000)?
Upvotes: 0
Views: 33
Reputation: 125488
You can use nested inner_hits
to retrieve details of the nested objects that match for a nested query. Note that elements
will need to be mapped as a nested
datatype field.
Upvotes: 1