minhvtt commited on
Commit
4cc60c6
·
verified ·
1 Parent(s): 58996e7

Update qdrant_service.py

Browse files
Files changed (1) hide show
  1. qdrant_service.py +4 -5
qdrant_service.py CHANGED
@@ -251,10 +251,10 @@ class QdrantVectorService:
251
  if len(query_embedding.shape) > 1:
252
  query_embedding = query_embedding.flatten()
253
 
254
- # Search với HNSW parameters tối ưu
255
- search_result = self.client.search(
256
  collection_name=self.collection_name,
257
- query_vector=query_embedding.tolist(),
258
  limit=limit,
259
  score_threshold=score_threshold,
260
  query_filter=filter_conditions,
@@ -268,8 +268,7 @@ class QdrantVectorService:
268
  )
269
  ),
270
  with_payload=True,
271
- with_vectors=False # Không cần return vectors
272
- )
273
 
274
  # Format results - trả về original_id thay vì UUID
275
  results = []
 
251
  if len(query_embedding.shape) > 1:
252
  query_embedding = query_embedding.flatten()
253
 
254
+ # Search với HNSW parameters tối ưu (qdrant-client v1.16.0+)
255
+ search_result = self.client.query_points(
256
  collection_name=self.collection_name,
257
+ query=query_embedding.tolist(),
258
  limit=limit,
259
  score_threshold=score_threshold,
260
  query_filter=filter_conditions,
 
268
  )
269
  ),
270
  with_payload=True,
271
+ ).points
 
272
 
273
  # Format results - trả về original_id thay vì UUID
274
  results = []