Skip to content
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

[Task] Simplify "All" node types search query #533

Open
Tracked by #588 ...
kmcginnes opened this issue Aug 1, 2024 · 0 comments · May be fixed by #607
Open
Tracked by #588 ...

[Task] Simplify "All" node types search query #533

kmcginnes opened this issue Aug 1, 2024 · 0 comments · May be fixed by #607

Comments

@kmcginnes
Copy link
Collaborator

kmcginnes commented Aug 1, 2024

When searching using the "All" node label type, we must ensure the resulting set of nodes has a label.

Rather than enforcing all label types:

MATCH (v)
WHERE (v:`Airport` OR v:`Country` OR v:`Region`)
RETURN v AS object
LIMIT 10

We can filter out unlabelled nodes by checking the label set size

MATCH (v)
WHERE size(labels(v)) > 0
RETURN v AS object
LIMIT 10
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

Successfully merging a pull request may close this issue.

1 participant