Relationship uniqueness in patterns
When a relation in a match pattern is not referenced elsewhere in the query, FalkorDB will only verify that at least one matching relation exists (rather than operating on every matching relation). In some queries, this will cause unexpected behaviors. Consider a graph with 2 nodes and 2 relations between them:LIMIT clause does not affect eager operations
When a WITH or RETURN clause introduces a LIMIT value, this value ought to be respected by all preceding operations. For example, given the query:Indexing limitations
One way in which FalkorDB will optimize queries is by introducing index scans when a filter is specified on an indexed label-property pair. The current index implementation, however, does not handle not-equal (<>) filters.
To profile a query and see whether index optimizations have been introduced, use the GRAPH.EXPLAIN endpoint:
Aggregation functions inside pattern comprehensions
Aggregation functions (e.g.,count(), sum(), avg()) are not allowed inside pattern comprehensions — neither in the eval expression nor in the embedded WHERE predicate. Attempting to use them there returns an error:
WITH or RETURN clause, or use list comprehension followed by size():
Frequently Asked Questions
Why does my query return unexpected counts with unnamed relationships?
Why does my query return unexpected counts with unnamed relationships?
Due to relationship uniqueness optimization, when a relationship is not referenced elsewhere in the query, FalkorDB only verifies that at least one matching relationship exists. Reference the relationship alias explicitly (e.g. in WHERE or RETURN) to get accurate counts.
Does LIMIT prevent eager operations from executing fully?
Does LIMIT prevent eager operations from executing fully?
No. This is a known limitation. Eager operations (CREATE, SET, DELETE, MERGE, and aggregating projections) execute fully before LIMIT is applied. For example,
CREATE (n) RETURN n LIMIT 1 still creates all nodes.Can indexes optimize not-equal filters?
Can indexes optimize not-equal filters?
No. The current index implementation does not handle
<> (not-equal) filters. Indexes are used for equality, range comparisons, and string prefix operations.Can I use aggregation functions inside pattern comprehensions?
Can I use aggregation functions inside pattern comprehensions?
No. Aggregation functions like
count(), sum(), and avg() are not allowed inside pattern comprehensions. As a workaround, compute aggregations in a preceding WITH or RETURN clause, or use size() on the list result.