Hi Shae, the shortesPath algo takes a RelationshipExpander which is implemented by a Expander subclass. For each Expander you can addNodeFilter and addRelationshipFilters using Predicates.
That should do what you try to achieve. If I got this wrong, please someone correct me. What is your current performance for the shortest path between the relevant nodes? Cheers Michael Am 02.02.2011 um 01:45 schrieb Shae Griffiths: > > Hi Team, > > I'm a bit of a Neo4j Newbie and am trying to use it for some shortest path > work. I have an embedded DB and am using Java to interact with it. At the > moment I have shortest path stuff working (using > GraphAlgoFactory.shortestPath as per the sample code), but i would like to > extend this to make a few decisions along its route. > > eg. find a shortest path from Node A to Node B, but avoiding all nodes that > have a specific property value (i.e. Find a relationship from Roger Black to > Peter White without going "through" anyone with the surname "smith") > or find the shortest path from Node A to Node B without encountering a > specific node. > > I see this as essentially the same problem, just with a different parameter. > The Evaluator class seems to have the brains to work it out, but i'm lost as > to how to implement it with the shortest path algorithm. Its a large-ish DB > (~14million nodes) so i'd like it to be a relatively fast solution if > there's one around. > > Am I barking up the wrong tree, has this been covered already and I missed > it, or am i on the right track but not quite there? > -- > View this message in context: > http://neo4j-user-list.438527.n3.nabble.com/Shortest-Path-Query-with-property-filters-tp2402322p2402322.html > Sent from the Neo4J User List mailing list archive at Nabble.com. > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user