Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions modules/ROOT/pages/functions/predicate.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ The below query finds `KNOWS` paths with a length of `3` where the `accumulator`
Paths that do not meet this requirement are excluded, such as the path with the sequence `["Keanu Reeves (58)", "Carrie Anne Moss (55)", "Guy Pearce (55)", "Liam Neeson (70)"]` which has an aggregated `age` value of `238`.

.Find aggregated ages within a boundary
// tag::functions_predicate_allreduce_boundary[]
// tag::functions_predicate_allreduce[]
[source, cypher]
----
MATCH (s) (()-[:KNOWS]-(n)){3}
Expand All @@ -154,7 +154,7 @@ RETURN [i IN [s] + n | i.name || " (" + toString(i.age) || ")"] AS ageSequence,
reduce(acc = 0, node IN [s] + n | acc + node.age) AS aggregatedAges
ORDER BY aggregatedAges
----
// end::functions_predicate_allreduce_boundary[]
// end::functions_predicate_allreduce[]

.Result
[role="queryresult",options="header,footer",cols="2*<m"]
Expand All @@ -171,7 +171,6 @@ The next query uses `allReduce()` to compare neighboring relationships.
It finds `KNOWS` paths with a length of at least `3` where each relationship’s `since` value is greater than the previous one and above `2000`.

.Find paths where a relationship property must be above a value and increase along a path
// tag::functions_predicate_allreduce_relationship_values[]
[source, cypher]
----
MATCH path = ()-[r:KNOWS]-{3,}()
Expand All @@ -185,7 +184,6 @@ RETURN [actor IN people | actor.name] AS connectedActors,
[rel IN r | rel.since] AS sinceYears
ORDER BY sinceYears
----
// end::functions_predicate_allreduce_relationship_values[]

.Result
[role="queryresult",options="header,footer",cols="2*<m"]
Expand Down