Skip to content

Instantly share code, notes, and snippets.

Created Jul 10, 2019
What would you like to do?
from elasticsearch_dsl import FacetedSearch, TermsFacet
class TweetSearch(FacetedSearch):
facets = {
# use bucket aggregations to define facets
'city': TermsFacet(field=''),
def search(self):
s = super().search()
# override the search queryset here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment