我使用Django和Haystack作为搜索引擎和后端Xapian。如何实现所有搜索都不区分大小写?对于用户来说,如果搜索引擎忽略大小写,只返回给定搜索查询的所有值,就会容易得多。在
我的搜索索引目前如下(简化): 在
def ArticleIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.EdgeNgramField(document=True, use_template=True)
name = indexes.CharField(model_attr='title')
def get_model(self):
return Article
我使用的是django haystack中包含的SearchView
和{
目前,查询'Plat'得到3个结果,这是正确的,查询'Plat'没有返回任何结果,如果搜索是区分大小写的,这也是正确的。在
目前没有回答
相关问题 更多 >
编程相关推荐