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:
@@ -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(
|
||||||
|
Reference in New Issue
Block a user