Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Find path between two vertex over edges with specific attribute #1102

Closed
hamidehhhs opened this issue Jun 1, 2021 · 6 comments
Closed

Find path between two vertex over edges with specific attribute #1102

hamidehhhs opened this issue Jun 1, 2021 · 6 comments

Comments

@hamidehhhs
Copy link

I have create a graph that some attributes on its edges.
I am wondering to find path between two vertex over edges filtered on its attribute.
To do so I try this query
FIND ALL PATH FROM <vertex_id1> TO <vertex_id2> OVER edge.attribute1 == "text";

but I faced 'SyntaxError'

Is it possible to filter edges with attribute on path queries?

@wey-gu
Copy link

wey-gu commented Jun 2, 2021

Dear @hamidehhhs ,

FIND query doesn't support where clause, a valid query is like:

FIND ALL PATH FROM <vertex_id1> TO <vertex_id2> OVER edge;

ref: https://docs.nebula-graph.io/2.0.1/3.ngql-guide/16.subgraph-and-path/2.find-path/

To filter attribute, you could use:

@wey-gu
Copy link

wey-gu commented Jun 2, 2021

Dear @hamidehhhs ,

Also, thanks to @nevermore3 , the PR(#1091) to support WHERE CLAUSE is WIP.

BR//Wey

@hamidehhhs
Copy link
Author

Dear @wey-gu

Thanks for your reply. So you mean now it is possible to filter edges attributes in find path algorithms now ?

@wey-gu
Copy link

wey-gu commented Jun 3, 2021

Dear @wey-gu

Thanks for your reply. So you mean now it is possible to filter edges attributes in find path algorithms now ?

Dear @hamidehhhs, sorry I meant it's not yet ready but is working in progress.

@wey-gu
Copy link

wey-gu commented Jun 11, 2021

update:

@CPWstatic
Copy link
Contributor

I'll close it first since we had another related issues. Now we have support for filtering the paths through edge properties, hope it is helpful for you.

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

No branches or pull requests

3 participants