Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/arcadedb/_native/schema_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ def _run_search(
out = []
for row in rows:
nested = row.get("record")
if nested is None and row.get("@rid") is not None:
# From ArcadeDB 26.11.1 (ArcadeData/arcadedb#10898) a vector row lists the record's
# properties once, on the row itself, and no longer under "record"
nested = {k: v for k, v in row.to_dict().items() if k != "distance"}
record = (
None
if nested is None
Expand Down
6 changes: 5 additions & 1 deletion tests/test_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,11 @@ def test_lsm_vector_search_approximate_persistence(self, tmp_path):
vertex = neighbors[0]
assert vertex is not None
assert isinstance(vertex, dict)
assert vertex.get("record") is not None
# ArcadeDB 26.11.1 (ArcadeData/arcadedb#10898) lists the record's properties on the row
# once; earlier engines nested them under "record". Either way the record is there.
record = vertex.get("record") or vertex
assert record.get("@rid") is not None
assert record.get("embedding") == [1.0, 0.0, 0.0]
assert vertex.get("distance") is not None

def test_lsm_vector_build_graph_now(self, test_db):
Expand Down
Loading