From eda8d85361768aa000e2f9fc199ee841b78ae9b3 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sun, 27 Sep 2026 20:59:02 +0200 Subject: [PATCH] fix: hybrid search finds nothing when a collection cannot be read (#31460) With hybrid search on and a vector database without built-in hybrid search, a collection that failed to load (for example Qdrant strict mode rejecting the request) was skipped quietly, so retrieval returned no documents and never fell back to normal vector search. A failed load now counts as a failed collection, so when every collection fails retrieval falls back to vector search, the same way it already does when the search itself fails. The retrieval API returns its usual error in that case. Part of #31459 --- backend/open_webui/retrieval/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/open_webui/retrieval/utils.py b/backend/open_webui/retrieval/utils.py index 055f750122..b1597aa2db 100644 --- a/backend/open_webui/retrieval/utils.py +++ b/backend/open_webui/retrieval/utils.py @@ -838,6 +838,7 @@ async def query_collection_with_hybrid_search( return name, await ASYNC_VECTOR_DB_CLIENT.get(collection_name=name) except Exception as e: log.exception(f'Failed to fetch collection {name}: {e}') + failed_collection_names.add(name) return name, None collection_results = dict(await asyncio.gather(*(_fetch_collection(name) for name in collection_names)))