Permalink
Browse files

bug 1177264 - remove search_explanation flag

  • Loading branch information...
groovecoder committed Sep 1, 2015
1 parent 611b278 commit f0f66d7f21b4ea595171e68815bf7204a0b09848
Showing with 2 additions and 3 deletions.
  1. +0 −1 docs/feature-toggles.rst
  2. +1 −1 kuma/search/filters.py
  3. +1 −1 kuma/search/templates/search/results.html
View
@@ -33,7 +33,6 @@ Flags
other advanced criteria.
* ``events_map`` - show the map on the events page
* ``search_explanation`` - show search results scoring details
* ``search_doc_navigator`` - show the search doc navigator feature
* ``search_drilldown_faceting`` - treat search filters as "drill-down" filters
- i.e., combine them with "AND" logic
View
@@ -100,7 +100,7 @@ def filter_queryset(self, request, queryset, view):
functions=[query.SF('field_value_factor', field='boost')],
)
if flag_is_active(request, 'search_explanation'):
if request.user.is_superuser:
queryset = queryset.extra(explain=True)
return queryset
@@ -34,7 +34,7 @@
<h4><a href="{{ doc.url }}"{% if index == 1 %} tabindex="1"{% endif %}>{{ doc.title }}</a></h4>
<p>{{ doc.excerpt|safe }}</p>
<p class="search-meta"><a href="{{ doc.url }}">{{ doc.url|replace('https://', '') }}</a>
{% if waffle.flag('search_explanation') %}Score: <span title="explanation: {{ doc.explanation }}">{{ doc.score }}</span>{% endif%}
{% if request.user.is_superuser %}Score: <span title="explanation: {{ doc.explanation }}">{{ doc.score }}</span>{% endif%}
{% if doc.parent %}
{% trans parent_url=doc.parent.url, parent_title=doc.parent.title, parent_language=settings.LOCALES[doc.parent.locale].native %}
translated from <a href="{{ parent_url }}" title="{{ parent_title }}">{{ parent_title }} ({{ parent_language }})</a>

0 comments on commit f0f66d7

Please sign in to comment.