Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/318.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Django Haystack+;Xapian:不区分大小写的自动查询搜索_Python_Django_Django Haystack_Xapian - Fatal编程技术网

Python Django Haystack+;Xapian:不区分大小写的自动查询搜索

Python Django Haystack+;Xapian:不区分大小写的自动查询搜索,python,django,django-haystack,xapian,Python,Django,Django Haystack,Xapian,我使用Django和Haystack作为搜索引擎和后端Xapian。如何确保所有搜索都不区分大小写?对于用户来说,如果搜索引擎忽略大小写,只返回给定搜索查询的所有值,这将容易得多 目前我的搜索索引如下(简化): def ArticleIndex(index.SearchIndex,index.Indexable): text=index.EdgeNgramField(document=True,use\u template=True) name=index.CharField(model_at

我使用Django和Haystack作为搜索引擎和后端Xapian。如何确保所有搜索都不区分大小写?对于用户来说,如果搜索引擎忽略大小写,只返回给定搜索查询的所有值,这将容易得多

目前我的搜索索引如下(简化):

def ArticleIndex(index.SearchIndex,index.Indexable):
text=index.EdgeNgramField(document=True,use\u template=True)
name=index.CharField(model_attr='title')
def get_型号(自):
退货
我正在使用django haystack中包含的
SearchView
SearchForm

目前,对“Plat”的查询会给出3个结果,这是正确的,而对“Plat”的查询不会返回任何结果,如果搜索是区分大小写的,这也是正确的