feat(sofiia-console): rank runbook search results with bm25
FTS path: score = bm25(docs_chunks_fts), ORDER BY score ASC; LIKE fallback: score null; test asserts score key present Made-with: Cursor
This commit is contained in:
@@ -49,6 +49,8 @@ def test_runbooks_search_finds_rehearsal(sofiia_module, tmp_path, tmp_docs_with_
|
||||
assert any("rehearsal" in p for p in paths), f"Expected path containing 'rehearsal', got {paths}"
|
||||
first = items[0]
|
||||
assert "path" in first and "title" in first and "snippet" in first
|
||||
assert "score" in first
|
||||
assert first["score"] is None or isinstance(first["score"], (int, float))
|
||||
|
||||
|
||||
def test_runbooks_preview_returns_headings(sofiia_module, sofiia_client, tmp_path, tmp_docs_with_rehearsal, monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user