ワンクリックで
find-paths-in-falkordb
Use algo.SPpaths/algo.SSpaths procedures and variable-length patterns to find paths in read queries
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use algo.SPpaths/algo.SSpaths procedures and variable-length patterns to find paths in read queries
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Search text properties with the db.idx.fulltext.queryNodes procedure when a full-text index exists
Write predicates that let FalkorDB use indexes and avoid full scans in read queries
Prefix read queries with CYPHER parameters for plan caching and safer value handling
Find nearest-neighbor nodes with the db.idx.vector.queryNodes procedure when a vector index exists
| name | Find paths in FalkorDB |
| description | Use algo.SPpaths/algo.SSpaths procedures and variable-length patterns to find paths in read queries |
Traverse relationships with variable-length patterns and FalkorDB's path-finding functions and procedures.
Use the algo.SPpaths procedure to find the shortest path between two specific nodes (single pair),
and algo.SSpaths for shortest paths from one source to all reachable nodes. Use variable-length
relationship patterns with shortestPath/allShortestPaths only for simple unweighted pattern matching.
MATCH (a:City {name: 'Paris'}), (b:City {name: 'Berlin'})
CALL algo.SPpaths({sourceNode: a, targetNode: b, relTypes: ['ROAD'], relDirection: 'outgoing', pathCount: 1})
YIELD path
RETURN [n IN nodes(path) | n.name] AS route
algo.SPpaths() for "shortest path between X and Y" questions; it is FalkorDB's dedicated
single-pair shortest-path procedure.sourceNode, targetNode, relTypes (array), relDirection (outgoing | incoming | both),
pathCount (1 = single shortest, 0 = all shortest, n = up to n paths).weightProp (e.g. 'dist', 'time') to minimize a weighted property, and costProp/maxCost
to constrain total cost. It YIELDs path, pathWeight, and pathCost.algo.SSpaths() (single source) for all shortest paths from one node to all reachable destinations.-[:TYPE*minHops..maxHops]->; bound the hops to avoid expensive traversals.shortestPath(...)/allShortestPaths(...) are unweighted pattern helpers for simple cases.-[:TYPE]- for undirected traversal and <-[:TYPE]- to follow relationships in reverse.