From c4287bf39e82b95c8dec09f50f58ef3cc7b5bdbe Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Thu, 10 Mar 2016 22:47:28 +0100 Subject: [PATCH] Also use plainto_tsquery when using unaccent --- umap/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/views.py b/umap/views.py index 397874fc..0132707b 100644 --- a/umap/views.py +++ b/umap/views.py @@ -147,7 +147,7 @@ class Search(TemplateView, PaginatorMixin): if q: where = "to_tsvector(name) @@ plainto_tsquery(%s)" if getattr(settings, 'UMAP_USE_UNACCENT', False): - where = "to_tsvector(unaccent(name)) @@ to_tsquery(unaccent(%s))" # noqa + where = "to_tsvector(unaccent(name)) @@ plainto_tsquery(unaccent(%s))" # noqa results = Map.objects.filter(share_status=Map.PUBLIC) results = results.extra(where=[where], params=[q]) results = results.order_by('-modified_at')