@@ -2197,11 +2197,12 @@ def reindex_hybrid_search(self, batch: int = 1000, purge: bool = False) -> None:
21972197 pbar .write (f"File: { result .id } successfully indexed." )
21982198 pbar .update (1 )
21992199
2200- operation_info = self .config .qdrant_client .upsert (
2201- collection_name = self .config .config .qdrant .search_collection ,
2202- points = points ,
2203- )
2204- assert operation_info .status == "completed"
2200+ if points :
2201+ operation_info = self .config .qdrant_client .upsert (
2202+ collection_name = self .config .config .qdrant .search_collection ,
2203+ points = points ,
2204+ )
2205+ assert operation_info .status == "completed"
22052206 session .commit ()
22062207
22072208 return None
@@ -2344,14 +2345,20 @@ def hybrid_search(
23442345
23452346 hybrid_query = [
23462347 # Dense retrieval: semantic understanding
2347- models .Prefetch (query = dense_query , using = "dense" , limit = limit ),
2348+ models .Prefetch (
2349+ query = dense_query , using = "dense" , limit = limit + offset + 100
2350+ ),
23482351 # Sparse retrieval: exact technical term matching
2349- models .Prefetch (query = sparse_embeddings , using = "sparse" , limit = limit ),
2352+ models .Prefetch (
2353+ query = sparse_embeddings , using = "sparse" , limit = limit + offset + 100
2354+ ),
23502355 ]
23512356 else :
23522357 hybrid_query = [
23532358 # Dense retrieval: semantic understanding
2354- models .Prefetch (query = dense_query , using = "dense" , limit = limit ),
2359+ models .Prefetch (
2360+ query = dense_query , using = "dense" , limit = limit + offset + 100
2361+ ),
23552362 ]
23562363
23572364 results = self .config .qdrant_client .query_points (
0 commit comments