I'm using Haystack 2.4.0 and elasticsearch 2.0.0.
I want my search function to be able to return values that are similar to the query. However, following the Getting Started tutorial of Haystack, my search queries can only return exact results. For example if I have "football" in my model instance, submitting "football" will in fact return that model instance. But if I type "footballs" or "footbal", nothing is returned.
I've looked around in SO, particularly the top answer here and answers here. The EdgeNgramField
and NgramField
solutions don't seem to be working for me. I have yet to try the CustomContains bug fix.
Even then, this might solve the problem for typing "footbal", but what about "footballs"?
I'm a beginner in Django, and web development in general actually, so maybe I'm getting it all wrong. How do I make Haystack return similar results as well?
Thanks a ton. Cheers!