Reveal Tips
This page contains a few tips for getting the most out of Reveal.
Use Anchors
You may have experienced when stepping through a query the visualization jumps around a lot. This is because the specified Limit
is path-based and may result in different paths being returned from step to step.
One way to minimize the visualization jumpiness is to define an Anchor in your MATCH
clause. Neo4j uses an Anchor and Traverse technique to perform graph traversals. An Anchor is a set of nodes to start from that are selected first, which are used as the starting point for graph traversals.
Consider this query:
MATCH p=(p1:Person)-[:ACTED_IN]->(:Movie)<-[:ACTED_IN]-(p2:Person)
WHERE p1 < p2
RETURN *
LIMIT 20
There is no anchor defined, so the set of paths within the limit of 20 can easily change. If the 20 paths change significantly from one step to another, the visualization will jump, making it difficult to see how things are changing.
To prevent this, we could add an anchor. To anchor on Keanu Reeves
we could instead write the query this way:
WITH ['Keanu Reeves'] as names
MATCH p=(p1:Person WHERE p1.name IN names)-[:ACTED_IN]->(:Movie)<-[:ACTED_IN]-(p2:Person)
WHERE p1 < p2
RETURN *
LIMIT 20
Now as you step through the MATCH
, the Keanu Reeves node will always be present in the visualization.
Change the Limit in the middle of Stepping
By default the Limit is 10, which is good for visualization performance reasons. However, sometimes it may be good to increase the limit to 30, 50, 100, or beyond in order to return more paths and/or results.
To see this change on your current step, do this:
-
Click Step backward a line (
) or Step backward inside line (
)
-
Change
Limit
to the desired value -
Click Step forward a line (
) or Step forward inside line (
)
Now you can see the step with more results.