rag: docnm_search (Boost 5.0) — Dateinamen als Volltext durchsuchbar (#52)

ES-Index: neues Feld docnm_search (custom analyzer mit path_splitter,
__ und _ werden zu Leerzeichen). docnm_kwd bleibt als Keyword.
Hybrid-Suche nutzt jetzt docnm_search mit Boost 5.0 —
Arakawa/Wohnung/Kambodscha etc. finden direkt ueber den Dateinamen
ohne handverdrahtete Subqueries.

Closes #52
This commit is contained in:
Homelab Cursor 2026-03-27 10:41:00 +01:00
parent 64a7fcafd0
commit 8b78cf0854

View file

@ -176,6 +176,7 @@ def _es_hybrid_search(query: str, es_size: int) -> dict:
{"match": {"content_de": {"query": query, "boost": 2.0}}}, {"match": {"content_de": {"query": query, "boost": 2.0}}},
{"match": {"content_ltks": {"query": query.lower(), "boost": 0.4}}}, {"match": {"content_ltks": {"query": query.lower(), "boost": 0.4}}},
{"match": {"docnm_kwd": {"query": query, "boost": 3.0}}}, {"match": {"docnm_kwd": {"query": query, "boost": 3.0}}},
{"match": {"docnm_search": {"query": query, "boost": 5.0}}},
], ],
"minimum_should_match": 0, "minimum_should_match": 0,
} }