mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-05 02:41:34 +00:00
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
This commit is contained in:
parent
8a90f0fc93
commit
eda8d85361
1 changed files with 1 additions and 0 deletions
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue