Skip to content

Instantly share code, notes, and snippets.

@pvanliefland
Created September 2, 2013 16:21
Show Gist options
  • Save pvanliefland/6414623 to your computer and use it in GitHub Desktop.
Save pvanliefland/6414623 to your computer and use it in GitHub Desktop.
print "complex facets"
query = {
"query": {
"match_all": {}
},
"facets": {
"facet1": {
"terms" : {"field" : "formations.group.name"},
"nested": "formations.group"
}
}
}
results = es.search(query, index='campus_index')
pprint(results)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment