Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-04-2019 03:29 PM
I'm applying Neo4j to the problem of diagram chasing, so my graph database holds diagrams that the users draw using my software. I need the ability to search for the user's drawing so as we don't have duplicates. Is the best way just to build up a really long query using Cypher? I will need to make use of regexes when matching.
Thanks!
03-04-2019 06:22 PM
Can you provide a sample query and some additional explanation? It would help to know the inputs and expected outputs.
03-04-2019 08:27 PM
I don't know the sample query yet but I heard you have to "build path patterns", which is probably what I'll do.
I have a local copy of a "graph" in PyQt5 objects. In each object I store their databaseID(), I need to take a small set of nodes and arrows and perform a matching over the whole thing. These query graphs are relatively small though, so I'm sure something is doable...
By that I mean a matching based on their labels which I store in a property (a list of strings). I want to match the subgraph if their is a regular directed graph isomorphism and the query graph labels match a subset of the matched result labels for each node / edge.
03-05-2019 05:34 PM
If your id's are indexed you can find the nodes by id (list) and then establish if there are neighborhood connections between them.
like
MATCH (a:Label) where a.id IN $ids
WITH collect(a) as nodes
WITH * WHERE all(a IN nodes where any(b IN nodes where b = a OR (b)-[:REL]-(a))
return nodes
Something like this?
All the sessions of the conference are now available online