{% macro search_result(result, s=None, as='s', r=None) %}
{% if waffle.flag('elasticsearch') %} {% set engine = 'es' %} {% else %} {% set engine = 'sph' %} {% endif %} {% set url = result.url|urlparams(s=s, as=as, r=r, e=engine) %} {{ result.title }}

{{ result.search_summary|safe }}

{% if result.type == 'question' %}
{% if result.object.is_solved %} {{ _('Solved') }} {% endif %} {% if result.object.num_answers > 0 %} {{ ngettext('1 reply', '{n} replies', result.object.num_answers)|f(n=result.object.num_answers) }} {% else %} {{ _('No replies') }} {% endif %} {{ ngettext('1 person has this problem', '{n} people have this problem', result.object.num_votes)|f(n=result.object.num_votes) }} {{ ngettext('1 new this week', '{n} new this week', result.object.num_votes_past_week)|f(n=result.object.num_votes_past_week) }}
{# .thread-meta #} {% endif %}
{# .result #} {% endmacro %}