diff --git a/app/grandchallenge/documentation/templates/documentation/docpage_detail.html b/app/grandchallenge/documentation/templates/documentation/docpage_detail.html index e19d11524..e2d6729ff 100644 --- a/app/grandchallenge/documentation/templates/documentation/docpage_detail.html +++ b/app/grandchallenge/documentation/templates/documentation/docpage_detail.html @@ -138,8 +138,7 @@ {% if search_results %} {% for result in search_results %}
-
{{ result.title }}
-
{{ result.headline|clean }}
+
{{ result.title }}
{% endfor %} {% else %} diff --git a/app/grandchallenge/documentation/views.py b/app/grandchallenge/documentation/views.py index 01c0a6946..d7297b607 100644 --- a/app/grandchallenge/documentation/views.py +++ b/app/grandchallenge/documentation/views.py @@ -1,6 +1,5 @@ from django.contrib.auth.mixins import PermissionRequiredMixin from django.contrib.postgres.search import ( - SearchHeadline, SearchQuery, SearchRank, SearchVector, @@ -44,10 +43,8 @@ def get_context_data(self, **kwargs): if keywords: query = SearchQuery(keywords) vector = SearchVector("title", "content") - headline = SearchHeadline("content", query) qs = ( - qs.annotate(headline=headline) - .annotate(rank=SearchRank(vector, query)) + qs.annotate(rank=SearchRank(vector, query)) .annotate( similarity=TrigramSimilarity("title", keywords) + TrigramSimilarity("content", keywords)