Skip to content

Clarify exists(pattern) function limitations #395

@gkorland

Description

@gkorland

Context

Migrated from FalkorDB/FalkorDB#1315.

Issue

The functions documentation describes the exists() predicate function as:

exists(pattern) — Returns true when at least one match for pattern exists

This implies that any graph pattern is supported. However, in practice, attempting to use exists() with a relationship pattern returns an error:

GRAPH.QUERY g "MATCH (n) WHERE exists((n)-[]-()) RETURN *"
(error) Unable to resolve filtered alias '(n)-[]-()'

Verified on FalkorDB v4.16.7 — the error still occurs.

Suggested Fix

Either:

  1. Update the docs to clarify what pattern types exists() actually supports (e.g., only property existence checks like exists(n.prop), or only specific pattern forms), or
  2. Note this as a known limitation and link to the related bug in the FalkorDB repo.

The WHERE clause docs show that pattern predicates work in WHERE directly (e.g., WHERE (p)-[:WON]->(s)), so users may be confused about why the same pattern doesn't work inside exists().

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions