Skip to content

Commit

Permalink
Add a few more results for searches.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Oct 13, 2014
1 parent d879fa1 commit 645cf4d
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions readthedocs/templates/search/elastic_search.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,23 @@ <h3>{% blocktrans with query=query|default:"" %}Results for {{ query }}{% endblo

{# Project #}
<a href="{{ result.fields.url }}">{{ result.fields.name }}</a>
<p>
{{ result.highlight.description.0|safe }}
</p>
{% for fragment in result.highlight.description|slice:":3" %}
<p>
...{{ fragment|safe }}...
</p>
<br>
{% endfor %}
{# End Project #}

{% elif result.fields.path %}

{# File #}
<a href="{% doc_url result.fields.project|get_project result.fields.version result.fields.path %}?highlight={{ query }}">{{ result.fields.project }} - {{ result.fields.title|safe }}</a>
</p>
<p>
{{ result.highlight.content.0|safe }}
{% for fragment in result.highlight.content|slice:":3" %}
<p>
...{{ fragment|safe }}...
</p>
{% endfor %}
{# End File #}

{% endif %}
Expand Down

0 comments on commit 645cf4d

Please sign in to comment.