Skip to content

docs(rest): explain traversal bounds - #582

Open
imbajin wants to merge 1 commit into
apache:masterfrom
hugegraph:codex/repair-bounded-traversal-docs
Open

imbajin wants to merge 1 commit into
apache:masterfrom
hugegraph:codex/repair-bounded-traversal-docs

Conversation

@imbajin

@imbajin imbajin commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Purpose

Keep the Chinese and English REST references aligned with the Server's bounded traversal behavior.

  • Neighbor Rank retains the highest-scoring candidates per layer before continuing. The request budget counts eligible candidate path nodes. Per-step top controls the number displayed.
  • Multi-node shortest path takes 2 to 10 vertices resolved by the graph lookup. A larger input is rejected at the eleventh resolved vertex.

NeighborRank 容量裁剪和多点最短路输入上限

Companion Server change

Verification

Compared the documented limits with the Server request handlers and ran the website link check.

- Explain which ranked vertices expand into the next layer.
- Distinguish the global budget from each layer's retention limit.
- Describe the resolved-vertex limit for multi-node shortest paths.
@imbajin
imbajin marked this pull request as ready for review December 3, 2026 07:14

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Score: 6.5/10 · Confidence: high

Blocking: yes

Summary

The new traversal guarantees describe a server change that has not landed in Apache HugeGraph, affecting ranking and input resource expectations.

Evidence

Apache master passes all new NeighborRank vertices to the next layer and materializes the entire multi-node input before validation. Fork server PR #396 remains open.

Validation notes

Source and discussion review only; no live server or integration test was run.


In graph words: to go out from the starting point, get the probability of going to each vertex of each layer.

The REST endpoint sums all contributions to each candidate before keeping up to 100,000 of the highest-scoring vertices in each layer.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Scope the retention guarantee to a server version

Current Apache NeighborRankTraverser accumulates into a bounded rank map and assigns all newVertices to the next layer, so it does not guarantee this full-score selection and restricted expansion. The companion implementation is still open against the fork. Please defer this claim until the equivalent server change ships in Apache, or identify the version that supports it in both languages.


Finds the shortest paths between pairs of specified vertices.

The graph lookup must return 2 to 10 starting vertices. With `ids`, only vertices found in the graph count.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Early rejection is not available in current Apache Server

MultiNodeShortestPathTraverser currently calls IteratorUtils.list(vertices) before checking the count, so it can read the entire lookup rather than stopping at the eleventh vertex. The bounded read is part of the still-open companion change. Please defer or version-scope this resource-bound claim in both languages until the server implementation is available.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant