Skip to content

Clarify how ElementIdStrategy works in the reference docs - #3890

Open
spmallette wants to merge 1 commit into
apache:masterfrom
spmallette:tp-docs-elementidstrategy-0fild
Open

spmallette wants to merge 1 commit into
apache:masterfrom
spmallette:tp-docs-elementidstrategy-0fild

Conversation

@spmallette

Copy link
Copy Markdown
Contributor

The ElementIdStrategy section said the strategy made identifier
assignment possible "by using vertex and edge indices under the hood",
which does not describe what it does. The strategy stores the assigned
identifier in a property (__id by default) and rewrites identifier-based
steps such as g.V(id), g.E(id), hasId(), id() and property(id, value)
on addV()/addE() to use that property.

This change describes that mechanism, names the default key and the
UUID default used when no identifier is supplied, and explains why
elementMap() and element string output show the graph-generated
identifier while id() returns the assigned one. The live example now
also adds and looks up an edge, a second example shows a custom key set
with idPropertyKey(), the builder options link to the javadoc, and the
IMPORTANT note names the property key that should be indexed.


A committer can direct the automation behind this PR with a comment:

  • assist:rebase — ask the maintainer to rebase the branch onto the latest master.
  • assist:feedback <details> — send <details> to the maintainer to act on.
    Comments without the assist: prefix are not actioned by the automation.

🤖 Agent assisted PR.

The ElementIdStrategy section said the strategy made identifier
assignment possible "by using vertex and edge indices under the hood",
which does not describe what it does. The strategy stores the assigned
identifier in a property (__id by default) and rewrites identifier-based
steps such as g.V(id), g.E(id), hasId(), id() and property(id, value)
on addV()/addE() to use that property.

This change describes that mechanism, names the default key and the
UUID default used when no identifier is supplied, and explains why
elementMap() and element string output show the graph-generated
identifier while id() returns the assigned one. The live example now
also adds and looks up an edge, a second example shows a custom key set
with idPropertyKey(), the builder options link to the javadoc, and the
IMPORTANT note names the property key that should be indexed.

Assisted-by: Kiro:claude-opus-5.5
@spmallette spmallette added agent-assisted PR driven by an agent. documentation labels Dec 4, 2026
@spmallette spmallette self-assigned this Dec 4, 2026
@codecov-commenter

codecov-commenter commented Dec 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.78%. Comparing base (a28cd1f) to head (1cf0552).
⚠️ Report is 1166 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3890      +/-   ##
============================================
+ Coverage     76.35%   78.78%   +2.42%     
- Complexity    13424    16063    +2639     
============================================
  Files          1012     1084      +72     
  Lines         60341    69272    +8931     
  Branches       7075     8363    +1288     
============================================
+ Hits          46076    54573    +8497     
+ Misses        11548    11403     -145     
- Partials       2717     3296     +579     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

agent-assisted PR driven by an agent. documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants