Skip to content

With shortest path, if you select the label, it should also take that into consideration when matching start and end node #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tomasonjo opened this issue Sep 10, 2020 · 0 comments

Comments

@tomasonjo
Copy link
Collaborator

I have selected label and rel type:

:param config => ({
  nodeProjection: 'Person',
  relationshipProjection: {
    relType: {
      type: 'HELPS',
      orientation: 'UNDIRECTED',
      properties: {
        weight: {
          property: 'weight',
          defaultValue: 1
        }
      }
    }
  },
  relationshipWeightProperty: 'weight'
});

But start and end node can be of other labels:

CALL db.propertyKeys() YIELD propertyKey MATCH (start) WHERE start[propertyKey] contains $startNode
WITH start
LIMIT 1
CALL db.propertyKeys() YIELD propertyKey MATCH (end) WHERE end[propertyKey] contains $endNode
WITH start, end

So an error can occur then

Algorithm failed to complete
Error: Neo4jError: Failed to invoke procedure gds.alpha.shortestPath.stream: Caused by: java.lang.IllegalArgumentException: startNode with id 802 was not loaded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant