cancel
Showing results for 
Search instead for 
Did you mean: 

Is pattern matching in neo4j exact or appoximate?

shayantest2
Node Clone

If we define a pattern as a cypher query and run it against a large neo4j database (with many million nodes), will it necessarily return all matching results or not? I.e., does neo4j use approximation algorithms to reduce the time complexity of executing queries and thus sacrifice completeness?

1 ACCEPTED SOLUTION

sevans_ate_9
Node Link

Hi @shayantest2 - Pattern matching in neo4j is exact to what is in your cypher query. The MATCH clause will return all results that match exactly to the cypher pattern. The MERGE either matches existing nodes and binds them, or it creates new data and binds that. Hope this helps!

View solution in original post

1 REPLY 1

sevans_ate_9
Node Link

Hi @shayantest2 - Pattern matching in neo4j is exact to what is in your cypher query. The MATCH clause will return all results that match exactly to the cypher pattern. The MERGE either matches existing nodes and binds them, or it creates new data and binds that. Hope this helps!