Last active
April 18, 2017 19:14
-
-
Save FrancoisConstant/b79bab04f83601c9e4b2 to your computer and use it in GitHub Desktop.
Django - Haystack - Elasticsearch - partial word
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
class MyIndex(SearchIndex): | |
text = EdgeNgramField(document=True, use_template=True) | |
# >edge... instead of indexes.CharField | |
# found here: http://stackoverflow.com/questions/4391631/how-do-i-do-a-partial-field-match-using-haystack |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment