Full-text search using postgresql #162

Merged
Oleg-Komarov merged 10 commits from fts into main 2024-06-03 20:07:23 +02:00
Showing only changes of commit 318ba218ea - Show all commits

View File

@ -167,8 +167,6 @@ class SearchView(ListedExtensionsView):
# pks are ordered by ranking, keep that order
# this approach is fine under the assumption that the list is small
return sorted(queryset.filter(pk__in=pks).order_by(), key=lambda x: pks.index(x.pk))
queryset = queryset.filter(search_query).distinct()
return queryset
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)