bitflicker64 commented on code in PR #412:
URL: https://github.com/apache/hugegraph-ai/pull/412#discussion_r4582713284


##########
hugegraph-llm/src/hugegraph_llm/indices/vector_index/milvus_vector_store.py:
##########
@@ -166,14 +163,15 @@ def search(self, query_vector: List[float], top_k: int, 
dis_threshold: float = 0
             ret = []
             for hits in results:
                 for hit in hits:
-                    if hit.distance < dis_threshold:
-                        prop_str = hit.entity.get("property")
-                        prop = self._serialize_property(prop_str)
-                        ret.append(prop)
+                    if hit.distance <= dis_threshold:
+                        # Property strings round-trip verbatim: decoding 
JSON-shaped
+                        # chunk text ("123", '{"a": 1}') would change its type 
and
+                        # make downstream consumers drop it as malformed.
+                        ret.append(hit.entity.get("property"))

Review Comment:
   Important: a numeric vid from an `AUTOMATIC` or `CUSTOMIZE_NUMBER` label is 
stored as `"123"` and now comes back as that string, so 
`GraphQueryNode._subgraph_query` sends `g.V(['123'])`, which HugeGraph resolves 
as a `StringId` that never matches the `LongId` vertex. Decode numeric vids on 
the `graph_vids` read path, as `GremlinExampleIndexQuery` does for examples, 
and add an `int` vid round-trip test.



-- 
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