5

I'm using Django with Haystack as Search Engine and as backend Xapian. How can I achive that all searches are performed case insensitive? For the user it would be a lot easier if the search engine ignores the case and just returns all values for the given search query.

My search index looks like this at the moment (simplified):

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

And I'm using the SearchView and SearchForm included in django-haystack.

At the moment a query for 'Plat' gives 3 results, which is correct, a query for 'plat' returns no results, which is also correct if the search is done case sensitive.

jrast
  • 444
  • 5
  • 21

0 Answers0