RedisGraph Commands


Very useful to read the Redis Graph commands although they are very similar to other systems always have their details.

Does anyone have a specific guide on functions? For example, MERGE creates more than one node when making the entire route.
Is this the route to take to not create anything new?

GRAPH.QUERY DEMO_GRAPH
“MERGE (charlie {nombre: ‘Charlie Sheen’}) - [r: ACTED_IN] -> (wallStreet: Película {nombre: ‘Wall Street’})”


GRAPH.QUERY DEMO_GRAPH
 "PARTY (charlie {name: 'Charlie Sheen'})
PARTY (wallStreet: Movie {name: 'Wall Street'})
MERGE (charlie) - [r: ACTED_IN] -> (wallStreet) "


Very useful to read the Redis Graph commands although they are very similar to other systems always have their details.


Does anyone have a specific guide on functions? For example, MERGE creates more than one node when making the entire route.
Is this the route to take to not create anything new?

GRAPH.QUERY DEMO_GRAPH
“MERGE (charlie {nombre: ‘Charlie Sheen’}) - [r: ACTED_IN] → (wallStreet: Película {nombre: ‘Wall Street’})”


GRAPH.QUERY DEMO_GRAPH
 "PARTY (charlie {name: 'Charlie Sheen'})
PARTY (wallStreet: Movie {name: 'Wall Street'})
MERGE (charlie) - [r: ACTED_IN] -> (wallStreet) "

Hi Vanessa,

We recently introduced some improvements to MERGE; the updated documentation is here: https://oss.redislabs.com/redisgraph/commands/#merge

To rewrite this query without risking node duplication, the following would be ideal:

GRAPH.QUERY DEMO_GRAPH
“MERGE (charlie {nombre: ‘Charlie Sheen’}) MERGE (wallStreet: Película {nombre: ‘Wall Street’}) MERGE(charlie)-[r: ACTED_IN]->(wallStreet)”


This will separately attempt to match the source or destination nodes, and only create a new one if the match fails. Afterwards, the edge between them will be introduced if it has no match.

HI,
Please review this link:

https://github.com/swilly22/redis-graph/blob/master/docs/commands.md

It contains REDis Graph commands with examples and explanations

Good Luck!!!