Hi am trying to create a query that will return aggregations for each hit returned from a query rather that aggregation for the full search response.
for example if i had two documents
{
"Name":"Jon",
"Cars":[
{
"Car Type":"BMW"
},
{
"Car Type":"Mini"
}
]
}
{
"Name":"Jon",
"Cars":[
{
"Car Type":"BMW"
},
{
"Car Type":"BMW"
}
]
}
if I do a query for Jon i want to then want a bucket aggregation for each Jon and there car types