{% extends "base.html" %} {% block title %}Recherche{% endblock %} {% block content %}

🔍 Recherche sémantique

Posez une question en langage naturel pour trouver des passages pertinents

{% if query %}
·
{% if results_data %}
{{ results_data.total_chunks }} passage{% if results_data.total_chunks > 1 %}s{% endif %} trouvé{% if results_data.total_chunks > 1 %}s{% endif %}
{% if results_data.mode == "hierarchical" %} 🌳 Recherche hiérarchique ({{ results_data.sections|length }} sections) {% else %} 📄 Recherche simple {% endif %}
{% if author_filter or work_filter %}
{% if author_filter %} {{ author_filter }} {% endif %} {% if work_filter %} {{ work_filter }} {% endif %}
{% endif %}
{% if results_data.fallback_reason %}
⚠️ Mode hiérarchique forcé : {{ results_data.fallback_reason }}
💡 Essayez une requête sur un sujet présent dans le corpus (ex: "croyance", "signe", "inférence") ou basculez en mode Auto-détection.
{% endif %} {% if results_data.results %} {% if results_data.mode == "hierarchical" and results_data.sections %}

📚 Sections pertinentes avec passages

{% for section in results_data.sections %}

{{ section.title[:100] }}{% if section.title|length > 100 %}...{% endif %}

⚡ {{ section.similarity }}% similaire {{ section.chunks_count }} passage{% if section.chunks_count > 1 %}s{% endif %}
{% if section.summary_text and section.summary_text != section.title and section.summary_text != section.section_path %}

{{ section.summary_text[:200] }}{% if section.summary_text|length > 200 %}...{% endif %}

{% endif %} {% if section.concepts %}
{% for concept in section.concepts %} {{ concept }} {% endfor %}
{% endif %}
{% if section.chunks %}
{% for chunk in section.chunks %}
{% if chunk.work and chunk.work.author %} {{ chunk.work.author }} {% endif %} {% if chunk.work and chunk.work.title %} {{ chunk.work.title }} {% endif %} ⚡ {{ chunk.similarity }}% similaire
"{{ chunk.text }}"
Section : {{ chunk.sectionPath or '—' }}  â”‚  Type : {{ chunk.unitType or '—' }}  â”‚  Langue : {{ (chunk.language or '—') | upper }}
{% if chunk.keywords %}
{% for kw in chunk.keywords %} {{ kw }} {% endfor %}
{% endif %}
{% endfor %}
{% else %}

Aucun passage trouvé pour cette section

{% endif %}
{% endfor %}
{% else %} {% for result in results_data.results %}
{{ result.work.title if result.work else '?' }} {{ result.sectionPath or '' }} {{ result.work.author if result.work else 'Anonyme' }}
{% if result.similarity %} ⚡ {{ result.similarity }}% similaire {% endif %}
"{{ result.text }}"
Type : {{ result.unitType or '—' }}  â”‚  Langue : {{ (result.language or '—') | upper }}  â”‚  Index : {{ result.orderIndex or '—' }}
{% if result.keywords %}
{% for kw in result.keywords %} {{ kw }} {% endfor %}
{% endif %}
{% endfor %} {% endif %} {% endif %} {% else %}
đź”®

Aucun résultat trouvé

Essayez une autre formulation ou modifiez vos filtres.

{% endif %} {% else %}

đź’ˇ Suggestions de recherche

{% endif %}
{% endblock %}