Closed szarnyasg closed 7 years ago
Our current Neo4j transformations get the ids of the selected nodes and first run a MATCH to get hold of these nodes:
MATCH
https://github.com/FTSRG/trainbenchmark/blob/6603ce16d8dd41573cfb882e6d1ba21b05577ffe/trainbenchmark-tool-neo4j/src/main/resources/transformations/PosLengthRepairRhs.cypher#L1-L2
Instead, it would be probably more efficient to use WITH and pass the nodes themselves:
WITH
WITH $segment SET segment.length = -segment.length + 1
And the corresponding Java code would look something like this:
Map<String,Object> params = ImmutableMap.of("segment", segmentNode); gds.execute(query, params);
Our current Neo4j transformations get the ids of the selected nodes and first run a
MATCH
to get hold of these nodes:https://github.com/FTSRG/trainbenchmark/blob/6603ce16d8dd41573cfb882e6d1ba21b05577ffe/trainbenchmark-tool-neo4j/src/main/resources/transformations/PosLengthRepairRhs.cypher#L1-L2
Instead, it would be probably more efficient to use
WITH
and pass the nodes themselves:And the corresponding Java code would look something like this: