This repository was archived by the owner on Apr 22, 2020. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 196
This repository was archived by the owner on Apr 22, 2020. It is now read-only.
k-shortest path array index out of bound #632
Copy link
Copy link
Open
Description
This error seems to come up when using nodeQuery and/or relationshipQuery param.
To reproduce:
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/geoiq/acetate/master/places/Europe-z4-z6.txt" as row FIELDTERMINATOR "\t" MERGE (city:City{name: row.name}) ON CREATE SET city.population = toINT(row.population), city.latitude = toFloat(row.latitude), city.longitude = toFloat(row.longitude) MERGE (country:Country{code: row.`country code`}) MERGE (city)-[:IS_IN]->(country) create rels:
WITH 250 as distanceInKm MATCH (c1:City),(c2:City) WHERE id(c1) < id(c2) WITH c1,c2, distance(point({longitude:c1.longitude,latitude:c1.latitude}), point({longitude:c2.longitude,latitude:c2.latitude})) as distance WHERE distance < (distanceInKm * 1000) MERGE (c1)-[l:LINK]->(c2) ON CREATE SET l.distance = distance This works as intended but loads all nodes and relationships...
MATCH (start:City{name:"Ljubljana"}),(end:City{name:"Amsterdam"}) CALL algo.kShortestPaths(start, end, 3, 'distance' ,{direction:'BOTH'}) YIELD resultCount, loadMillis, evalMillis, writeMillis RETURN resultCount When trying to filter out nodes and rels
MATCH (start:City{name:"Ljubljana"}),(end:City{name:"Amsterdam"}) CALL algo.kShortestPaths(start, end, 3, 'distance' ,{nodeQuery:'Country',relationshipQuery:'LINK',direction:'BOTH'}) YIELD resultCount, loadMillis, evalMillis, writeMillis RETURN resultCount I get
Failed to invoke procedure
algo.kShortestPaths: Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
Metadata
Metadata
Assignees
Labels
No labels