I have tried to filter out all the objects/documents in the nested objected called jobs_won, but I can't seem to get it to work. I have been googling for days
How do I filter out certain objects/documents based on the term "r_published": 1
{
"aggs": {
"jobs_won": {
"nested": {
"path": "jobs_won"
},
"aggs": {
"total_jobs_won": {
"terms": {
"field": "jobs_won.b_id"
}
}
}
}
}
}
An example of how a job_won object/document looks like. This object is nested:
{
"r_score": 5,
"r_published": 1,
"b_id": 422133
}