docs(kshortest): document the filter lambda for KSHORTEST - #1725
Draft
imilinovic wants to merge 2 commits into
Draft
docs(kshortest): document the filter lambda for KSHORTEST#1725imilinovic wants to merge 2 commits into
imilinovic wants to merge 2 commits into
Conversation
Adds a "Constraining the expansion based on property values" section mirroring the equivalent BFS/WSP/ASP sections, with examples that run against the dataset already on the page. Replaces the "No filter lambdas" limitation with the two that remain: KSHORTEST orders by hop count and takes no weight lambda, and the three-argument `(r, n, p | ...)` form is not supported.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The page said `|k` returns "at most 3 shortest paths between the source and target nodes" and never said what happens with more than one pair, which is the part that changed: the limit applies per source-target pair, so a query matching several pairs returns up to `k` for each. Also document that the limit may be an expression reading the current row - it must be an integer on every pair, so an optional property needs `coalesce` - and that a negative limit, a negative minimum depth and a maximum depth below 1 raise errors while an inverted range is simply empty.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release note
KSHORTEST path expansion now accepts a filter lambda. Documents the
(r, n | ...)syntax with runnable examples, and replaces the "No filter lambdas" limitation with the two that remain: KSHORTEST orders by hop count and takes no weight lambda, and the three-argument(r, n, p | ...)form is not supported.Related product PRs
PRs from product repo this doc page is related to:
memgraph/memgraph#4559
Checklist:
bugfixorfeaturelabel, based on the product PR type you're documentingNotes for the reviewer:
(r, n | n.name <> "B")leaves the single pathA → C → E, and2..4 |3 (r, n | n.name <> "D")leavesA → C → EandA → B → C → E.