Last active
December 22, 2015 21:00
-
-
Save georgiana-b/6c4aaa8d92e903ddc50e to your computer and use it in GitHub Desktop.
Correct 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
{ | |
"aggs": { | |
"entities":{ | |
"nested": { | |
"path": "procuring_entity" | |
}, | |
"aggs": { | |
"procuring_entity_names": { | |
"terms": { | |
"field": "procuring_entity.x_slug", | |
"size": 0 | |
}, | |
"aggs": { | |
"back_for_suppliers": { | |
"reverse_nested": {}, | |
"aggs": { | |
"suppliers":{ | |
"nested": { | |
"path": "suppliers" | |
}, | |
"aggs": { | |
"supplier_names": { | |
"terms": { | |
"field": "suppliers.x_slug", | |
"size": 0 | |
}, | |
"aggs": { | |
"back_for_awards": { | |
"reverse_nested": {}, | |
"aggs": { | |
"awards":{ | |
"nested": { | |
"path": "award.value" | |
}, | |
"aggs": { | |
"award_values": { | |
"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