I am trying to create a TraversalDescription that will perform the following search;
- Return only nodes that have a certain property (“type” == “PERSON”)
- Return a certain fixed number of results (the entire graph is huge, we are only interested in the local graph)
- Any relationship types can be used
I haven’t managed to get very far, I can’t seem to figure out how to create an Evaluator for node properties;
TraversalDescription td = Traversal.description().bredthFirst().evaluator(?...);
I fixed this by simply implementing the Evaluator interface, and overwriting the Evaluator.evaluate(Path p) method;
And then my TraversalDescription definition ends up looking like: