Skip to content

[New cypher engine] UNWIND + Params : Relations are not created #3138

@ExtReMLapin

Description

@ExtReMLapin

Hello,

While the ingestion of my data in my RAG app "succeeds" with no error, there are clearly missing relations in the database. I end up with "isolated" vertexes/nodes, which should not really happen.

Version : using latest commit build (HEAD on main).

long story short, I have a querythat creates relations by batch :

UNWIND $batch as row
MATCH (a),(b) WHERE ID(a) = row.source_id and ID(b) = row.target_id 
MERGE (a)-[r:in]->(b) RETURN a, b, r

params : {"batch": [{"source_id": "#1:0", "target_id": "#4:0", "features": {}, "relation_type": "in"}, {"source_id": "#1:1", "target_id": "#4:0", "features": {}, "relation_type": "in"}, {"source_id": "#1:2", "target_id": "#4:0", "features": {}, "relation_type": "in"}, {"source_id": "#1:3", "target_id": "#4:0", "features": {}, "relation_type": "in"}, {"source_id": "#1:2048", "target_id": "#4:0", "features": {}, "relation_type": "in"}, {"source_id": "#1:2049", "target_id": "#4:0", "features": {}, "relation_type": "in"}, {"source_id": "#1:2050", "target_id": "#4:0", "features": {}, "relation_type": "in"}, {"source_id": "#1:2051", "target_id": "#4:0", "features": {}, "relation_type": "in"}, {"source_id": "#1:4", "target_id": "#4:0", "features": {}, "relation_type": "in"}]}

Database dump (right BEFORE trying to execute this query) :

MIAOUUU-backup-20260115-065309854.zip

Reading the query, we would expect to create a relation between #1:0 and #4:0

Check before executing the query from above :

(please note that in studio the relation/edge even if not requested is still displayed between returned nodes)

match (a), (b) WHERE ID(a) = "#1:0" AND ID(b) = "#4:0" return a, b

Image

Check after executing the query from above :

Image

Execution of query (the one with params) returned nothing, even with the RETURN a, b, r


  • Tried to replace MERGE with CREATE, still not working

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions