Have a new Expander which greatly improves the performance:
public Iterable expand(Path path, BranchState state) {
Node end = path.endNode();
// return all at the first step
if (path.length() < 1){
return end.getRelationships(Direction.OUTGOING);
} else {
// for all others get the next step from the index relIx
Relationship endRel = path.lastRelationship();
Integer lastSeq= (Integer)endRel.getProperty(SEQUENCE) + 1;
Object lastID = endRel.getProperty(ID);
String id_seq = lastID + "_" + lastSeq;
IndexHits<Relationship> rels = relIx.get("id_seq", imo_seq, end,
null);
return (Iterable) rels.iterator();
}
}
Now I have ~2.000.000 relations/trips, ~1.200 nodes/locations, for ~6.000
trucks and I get 5.000 results from A to B within 12 seconds on my
development machine.
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.