Created
July 10, 2019 12:04
-
-
Save harshvb7/9a3cf9b2895935d8e0dafb4af52f0efd to your computer and use it in GitHub Desktop.
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
# we also index a keyword version of the field | |
name = Text( | |
analyzer=my_custom_analyzer, | |
fields={'keyword': es.Keyword()} | |
) | |
# and use it with facets like this | |
'city': TermsFacet(field='user.city.name.keyword'), | |
# so now we can use the same field for free text search as well as filters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment