Last active
December 22, 2015 21:09
-
-
Save georgiana-b/7af651026da7ec73be13 to your computer and use it in GitHub Desktop.
Incorrect aggregation to get all x_amountEur/pair of supplier-procuring_entity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"search_type": "count" , | |
"body":{ | |
"aggregations": { | |
"entities":{ | |
"nested": { | |
"path": "procuring_entity" | |
}, | |
"aggs": { | |
"procuring_entity_names": { | |
"terms": { | |
"field": "procuring_entity.x_slug", | |
"size": 0 | |
}, | |
"aggs": { | |
"suppliers": { | |
"nested": { | |
"path": "suppliers" | |
}, | |
"aggs": { | |
"suppliers_names": { | |
"terms":{ | |
"field": "suppliers.x_slug", | |
"size": 0 | |
}, | |
"aggs": { | |
"awards": { | |
"nested": { | |
"path": "award.value" | |
}, | |
"aggs": { | |
"award_amounts": { | |
"terms":{ | |
"field": "award.value.x_amountEur", | |
"size": 0 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment