Fix qdrant payload id

Qdrant now is using PointStruct.payload["id"], not PointStruct.id UUID.
This will fix id overwrite
This commit is contained in:
dixyes
2025-03-08 16:40:40 +08:00
parent 27ab894d00
commit 458eafd714

View File

@@ -135,7 +135,7 @@ class QdrantVectorDBStorage(BaseVectorStorage):
logger.debug(f"query result: {results}") logger.debug(f"query result: {results}")
return [{**dp.payload, "id": dp.id, "distance": dp.score} for dp in results] return [{**dp.payload, "distance": dp.score} for dp in results]
async def index_done_callback(self) -> None: async def index_done_callback(self) -> None:
# Qdrant handles persistence automatically # Qdrant handles persistence automatically
@@ -264,7 +264,7 @@ class QdrantVectorDBStorage(BaseVectorStorage):
# Format the results to match expected return format # Format the results to match expected return format
formatted_results = [ formatted_results = [
{**point.payload, "id": point.id} for point in matching_records {**point.payload} for point in matching_records
] ]
logger.debug( logger.debug(