You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there's a discrepancy in behavior between the local and remote Qdrant clients regarding the payloads returned by search or scroll operations.
Problem:
In the local Qdrant client, whether using in-memory storage or local files, the payload returned by search or scroll operations is the original copy. Consequently, any edits made to this payload affect the corresponding data in the database directly, without necessitating a call to set_payload.
However, the behavior is different in the remote Qdrant client. Each payload returned by a search operation is a fresh copy. Modifications to this payload do not impact the corresponding data in the database unless set_payload is called to explicitly update the new payload.
Proposal:
To align the behavior of the local Qdrant client with that of the remote client and ensure consistency across both, I propose modifying the local client to return a deepcopy of the payload when querying. This approach will maintain the expected behavior where modifications to the returned payload do not directly affect the data in the database unless set_payload is invoked.
Implementation:
Introduce a deepcopy mechanism within the local Qdrant client's search and scroll functions to ensure that a new copy of the payload is returned for each query. This would involve utilizing Python's copy.deepcopy() method or a similar mechanism to create a deep copy of the payload object before returning it to the caller.
Expected Outcome:
By implementing this modification, users of the local Qdrant client will experience behavior consistent with the remote client. This change will enhance the predictability and reliability of interactions with Qdrant across different client environments.
The text was updated successfully, but these errors were encountered:
Currently, there's a discrepancy in behavior between the local and remote Qdrant clients regarding the payloads returned by search or scroll operations.
Problem:
In the local Qdrant client, whether using in-memory storage or local files, the payload returned by search or scroll operations is the original copy. Consequently, any edits made to this payload affect the corresponding data in the database directly, without necessitating a call to
set_payload
.However, the behavior is different in the remote Qdrant client. Each payload returned by a search operation is a fresh copy. Modifications to this payload do not impact the corresponding data in the database unless
set_payload
is called to explicitly update the new payload.Proposal:
To align the behavior of the local Qdrant client with that of the remote client and ensure consistency across both, I propose modifying the local client to return a deepcopy of the payload when querying. This approach will maintain the expected behavior where modifications to the returned payload do not directly affect the data in the database unless
set_payload
is invoked.Implementation:
Introduce a deepcopy mechanism within the local Qdrant client's search and scroll functions to ensure that a new copy of the payload is returned for each query. This would involve utilizing Python's
copy.deepcopy()
method or a similar mechanism to create a deep copy of the payload object before returning it to the caller.Expected Outcome:
By implementing this modification, users of the local Qdrant client will experience behavior consistent with the remote client. This change will enhance the predictability and reliability of interactions with Qdrant across different client environments.
The text was updated successfully, but these errors were encountered: