-
Notifications
You must be signed in to change notification settings - Fork 412
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
Where Union of Labels #1714
Comments
It seems you're trying to execute Cypher queries within a PostgreSQL environment using the cypher function. The error you're encountering is due to the incorrect usage of the '|' symbol in the label definition within your MATCH clause. In Cypher, '|' is not used to denote multiple labels for a node. Instead, you should use the IN keyword. Here's the corrected version of your first query: sql Alternatively, you can use your second query as you provided: sql Both queries should achieve the same result, with the second one explicitly checking the labels of nodes. Choose whichever you find more readable or preferable for your use case. |
This is not correct. According to the openCypher specification, the pipe operator '|' is a valid way to define union of multiple labels. |
This issue is stale because it has been open 45 days with no activity. Remove "Abondoned" label or comment or this will be closed in 7 days. |
This issue is stale because it has been open 60 days with no activity. Remove "Abondoned" label or comment or this will be closed in 14 days. |
|
Apache AGE does not support multiple labels, yet. There is a PR in review that could add this in the future. However, it is a large PR and needs to be thoroughly reviewed. |
Hey @jrgemignani thankyou for chiming in, aware of the multi-label PR but this is a separate issue with querying that's needed even with single-label support. What should be possible is being able to OR between labels in a query which is relevant for single labels, not ANDing for situations where you want to match on multiple labels on a query (which I believe in openCypher terms is expressed as
Being able to run a query and say 'Give me any Air OR Sea route between these two cities', which should be possible (in openCypher terms) via
You can do it today via a WHERE clause as shown above but the syntax is super clunky. |
Hi @alexgraul Although the PR refers it as 'multi-label', it does support the |
ohhh nice! Awesome, thankyou for clarifying! |
Hi, how do I run this?
I get
Is this the only way to get what I want?
The text was updated successfully, but these errors were encountered: