Update umap/views.py
Co-authored-by: Adrien nayrat <adrien.nayrat@gmail.com>
This commit is contained in:
parent
7384fda61a
commit
005a759b81
1 changed files with 1 additions and 1 deletions
|
@ -192,7 +192,7 @@ class Search(TemplateView, PaginatorMixin):
|
||||||
if q:
|
if q:
|
||||||
where = "to_tsvector(name) @@ websearch_to_tsquery(%s)"
|
where = "to_tsvector(name) @@ websearch_to_tsquery(%s)"
|
||||||
if getattr(settings, "UMAP_USE_UNACCENT", False):
|
if getattr(settings, "UMAP_USE_UNACCENT", False):
|
||||||
where = "to_tsvector(unaccent(name)) @@ websearch_to_tsquery(unaccent(%s))" # noqa
|
where = "to_tsvector('umapdict',name) @@ websearch_to_tsquery('umapdict',%s)" # noqa
|
||||||
results = Map.objects.filter(share_status=Map.PUBLIC)
|
results = Map.objects.filter(share_status=Map.PUBLIC)
|
||||||
results = results.extra(where=[where], params=[q])
|
results = results.extra(where=[where], params=[q])
|
||||||
results = results.order_by("-modified_at")
|
results = results.order_by("-modified_at")
|
||||||
|
|
Loading…
Reference in a new issue