[Fixed]-I don't understand the results that's returning from elasticsearch/haystack


There is a problem with the filter() method on Charfield indexes for django-haystack 2.1.0. You can change them to NgramField instead, for example text = indexes.NgramField(document=True, template_name=True).

The problem is that when you use this combination you get just the first character. So it returns you all the matches that has a ‘d’ in their text index field.

Leave a comment