imbajin commented on code in PR #414:
URL: https://github.com/apache/hugegraph-ai/pull/414#discussion_r4611385153


##########
hugegraph-llm/src/hugegraph_llm/indices/vector_index/base.py:
##########
@@ -32,15 +32,27 @@ def add(self, vectors: List[List[float]], props: List[Any]):
         """
         Add a list of vectors and their corresponding properties to the store.
 
+        Non-string values are stored in a backend-defined form and read back
+        in that form: the file-backed store keeps the original Python values
+        (pickle), server-backed JSON-payload stores keep JSON-representable
+        values, and text-column backends store JSON text and return that text.
+        Input APIs (add, remove) take the original values; read APIs (search,
+        get_all_properties) return the stored form. Pass string properties to

Review Comment:
   **⚠️ Qualify the removal contract for unhashable properties**
   
   `add()` accepts dictionaries and lists, but the backends convert a list of 
removal properties to a set before processing it. For example, `remove([{"k": 
1}])` raises `TypeError` instead of deleting the value. Please document the 
hashability restriction or make removal accept these original values.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to