尽管医生说
The contains filter became the new default filter as of Haystack v2.X (the default in Haystack v1.X was exact). This changed because exact caused problems and was unintuitive for new people trying to use Haystack. contains is a much more natural usage.
http://django-haystack.readthedocs.org/en/latest/searchqueryset_api.html
我发现我的Solr返回exact
匹配。
我尝试了继承SearchForm并覆盖search
函数来使用
根据{{3}}的建议过滤(content__contains = ...)
但它不起作用。
如何进行contains
搜索?
使用django haystack how do I find substrings in words?中建议的Ngram是唯一的方法吗?
如果重要,我会使用solr 3.6。