This commit is contained in:
Timothy Jaeryang Baek committed 2025-09-21 00:14:43 -04:00
1 parent 5e6e25f8c8
commit 6e4a2f18e1
2 files changed
+12 -4

No files matched your search

+7 -1
View File
@@ -127,7 +127,13 @@ def query_doc_with_hybrid_search(
hybrid_bm25_weight: float,
) -> dict:
try:
if not collection_result.documents[0]:
if (
not collection_result
or not hasattr(collection_result, "documents")
or not collection_result.documents
or len(collection_result.documents) == 0
or not collection_result.documents[0]
):
log.warning(f"query_doc_with_hybrid_search:no_docs {collection_name}")
return {"documents": [], "metadatas": [], "distances": []}