I have loaded some data into the database and I want to visualize it on my website.
The database stores some keywords that are related to each other. There's only one type of node and one type of single sided relationship.
I have a really limited knowledge on graph databases and I wanted to reach out to get some guidance. I discovered that I can visualize recursive relationships in the neo4j browser using an asterisk in the query when I specify the relationship and this worked very nicely when my database didn't have many records and relationships. Now that I've grown it querying it in aura fails because it runs out of memory and on docker it takes ages to complete.
I looked at the traversal framework to see if it could maybe help me navigate around it. I visualize my data in d3. All I need is nodes and relationships. I was thinking I could use the traversal framework to traverse the graph and as I do it output each traversed node and its relationships.
I was thinking though, I might need to keep track of traversed nodes in case of running into situations where I try to traverse the graph cyclically over and over. Do I store the node keys into a hashmap or something to keep track of the nodes that have been traversed or is there some type of evaluator that I can use to help me evaluate if I should traverse the node?
The last thing is I ripped off the code from the graph method in this example
movies-java-bolt/src/main/java/example/movies/backend/MovieService.java at main · neo4j-examples/movies-java-bolt · GitHub and it works great for getting just the relationship of a single node and building the graph node by node but once I leverage the traverser I should have no problem getting the type of output I need right?
The asterisk symbol indicates a variable length search starting with a min of one hop (relationship) to no max constraint on the length to search. The full syntax is “*min..max”, where min and max are integers. Each is optional, with min defaulting to one and max to no limit. The is also new approach to specifying variable length patterns called quantified paths. It has more capabilities.
It is expected for your query performance degrades your graph increases in size if you are trying to find patterns of the entire graph. Is this a practical approach to rendering your graph, or should focus on an area or property of the graph to visualize?
The traversal framework is part of the Java API. It can be used in embedded solutions or via custom procedures deployed to your servers. The custom procedures can then be accessed via cypher’ CALL clause. This is all done in Java.
The traversal framework has uniqueness constraints you can specify for your traversals to restrict traversing nodes and relationships more than once.
Exactly. I think I will try to limit it to some number of relationships.
Embedded solutions as in embedding a neo4j server in my app? I don't think I have enough memory to do that. Can I upload my stored procedures into aura?
Unfortunately Aura doesn’t support custom plugins.
Alright. Thanks. I was able to leverage the Driver.executableQuery method to get the output I needed. Thankfully I found the nodes and relationships there after I ran my path query.
Is there an easy way to match on multiple property values?
I have a simple query query MATCH p=(:Node {text:$text})-[:RELATIONSHIP *0..2]->() return p and I would like to match on multiple text values. The resulting graph could be overlapping so in case queries for two values have a node in common is there a way to connect the graphs?
Edit:
Oh okay I found the answer here: Finding common complete path between multiple input nodes - #3 by kiriti.chinthapalli
Thanks a lot