I am working on an existing Django project that uses haystack with xapian backend for a global search function. However, the search seems to fail when I perform a search with some special characters, such as ... etc. I tried, but could not find a way to fix this.
Is there a way to avoid these characters and make the search work? I am using PostgreSQL in the background. Any pointers would be very helpful.
Update: The search function uses SearchForm, and the query string is in the q field of. This is used in the code below.
sqs = self.searchqueryset.auto_query(self.cleaned_data['q'])
I tried using:
sqs = self.searchqueryset.filter(self.cleaned_data['q'])
and
sqs = self.searchqueryset.filter(content=Clean(self.cleaned_data['q']))
bad luck. I still cannot search with spaces and special characters like &.