{% extends "_base.html" %} {% block title %}Suchergebnisse - Solr Helper{% endblock %} {% block content %}
{{ unique_key_field }} | Relevante Felder | Aktionen |
---|---|---|
{{ doc[unique_key_field] }}
|
{% set doc_id = doc[unique_key_field] %}
{% if results.highlighting and results.highlighting.get(doc_id) %}
{% for field_name, snippets in results.highlighting[doc_id].items() %}
{% if snippets %}
{% for snippet in snippets[:2] %}
{{ field_name }}
{{ snippet|safe }}
{% endfor %}
{% endif %}
{% endfor %}
{% else %}
{% for field_name, field_value in doc.items() %}
{% if field_name != unique_key_field and field_name != '_version_' and field_value %}
{% if field_value is string and query.lower() in field_value.lower() %}
{{ field_name }}
{{ field_value[:100] }}{% if field_value|length > 100 %}...{% endif %}
{% elif field_value is iterable and field_value is not string %}
{% set found_match = false %}
{% for item in field_value %}
{% if not found_match and item is string and query.lower() in item.lower() %}
{{ field_name }}
{{ item[:100] }}{% if item|length > 100 %}...{% endif %}
{% set found_match = true %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% if not results.highlighting or not results.highlighting.get(doc_id) %}
{% set has_highlights = false %}
{% for field_name, field_value in doc.items() %}
{% if field_name != unique_key_field and field_name != '_version_' and field_value and not has_highlights %}
{{ field_name }}
Keine Textvorschau verfügbar
{% set has_highlights = true %}
{% endif %}
{% endfor %}
{% endif %}
|
Bearbeiten |
Für den Suchbegriff "{{ query }}" wurden keine Dokumente gefunden.
Neue Suche starten