Skip to content

docs: clarify property-query index coverage - #503

Open
contrueCT wants to merge 7 commits into
apache:masterfrom
contrueCT:task/3243-index-coverage-docs
Open

contrueCT wants to merge 7 commits into
apache:masterfrom
contrueCT:task/3243-index-coverage-docs

Conversation

@contrueCT

@contrueCT contrueCT commented Sep 28, 2026 •

Copy link
Copy Markdown

Summary

Clarify the property-index query rules beside the existing properties parameters in the English and Chinese Vertex and Edge REST API pages.

  • Define query-visible candidate labels, including empty labels and the parent/sub-edge coverage rule. A parent index can cover sub-labels only when the parent is visible to the query.
  • Distinguish no/partial/complete compatible coverage for type-valid values and the empty-result exception for type-incompatible values after an index matches.
  • Explain labeled PRIMARY_KEY direct lookup, rejection of range conditions when all primary-key fields are supplied, and vertex_id-bounded adjacency.
  • Wrap added prose close to 160 characters per line, allowing shorter paragraph endings; keep Chinese line breaks at sentence endings and related conditions in the same paragraph.

Related code: apache/hugegraph#3243. Related scope: apache/hugegraph#3201; its selective fallback optimization remains open. Publish this documentation with or after #3243: released versions can still silently omit matches under partial coverage.

Validation

  • git diff --check and added-prose line-length / Chinese sentence-boundary checks passed.
  • bash dist/validate-links.sh passed.
  • Strict production scripts/hugo.sh build passed locally on macOS arm64 with Hugo Extended 0.165.0 and Go 1.27.1; the pinned OINK v1.1.0 module and checksums were verified with scripts/oink_module.py.
  • Rendered English/Chinese Vertex/Edge paragraphs checked for the primary-key range restriction and parent visibility qualification, including placement next to the existing rules and Chinese whitespace.
  • Content-only change; routes, navigation, configuration and visual assets are unchanged.

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Blocking: no. Summary: The index-coverage guidance matches the paired query fix, with one exception for labeled primary-key lookups. Evidence: In apache/hugegraph#3243 head f435a1f, GraphTransaction.optimizeQuery() converts a labeled query containing every primary-key field into an IdQuery, bypassing property-index lookup.

Comment thread content/en/docs/clients/restful-api/vertex.md Outdated

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Blocking: no. Summary: The index-coverage guidance is clear overall, with two minor edge cases noted inline. Evidence: Static review against GraphIndexTransaction.java and SourceIndexCoverageTest.java at apache/hugegraph#3243 head 0de33ed.

Comment thread content/en/docs/clients/restful-api/vertex.md Outdated
Comment thread content/en/docs/clients/restful-api/edge.md Outdated

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blocking: no. Summary: The coverage rules match GraphIndexTransaction.checkIndexCoverage() and GraphTransaction.optimizeQuery() at apache/hugegraph#3243 head 0de33ed, including the PRIMARY_KEY direct lookup and the vertex_id adjacency path; one Chinese line break renders as a stray space. The two open Minor threads on invalid values and parent edge labels still apply at this head and are not repeated here. Evidence: static review of 1e67982 against GraphIndexTransaction.java (queryIndex, queryByUserprop, collectMatchedIndexes, checkIndexCoverage), GraphTransaction.optimizeQuery(), HugeVertexStep (resetUserpropConditions for adjacency filters), EdgeAPI.list and SourceIndexCoverageTest at 0de33ed; hugo.yaml markup.goldmark has no cjk extension.

Comment thread content/cn/docs/clients/restful-api/edge.md Outdated
imbajin

This comment was marked as outdated.

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blocking: no. Summary: The coverage rules match GraphIndexTransaction at apache/hugegraph#3243 head 7f5a917, including the new hidden/deleting label filter, the father-label skip and the invalid-value ordering. One gap remains: a labeled PRIMARY_KEY query with a non-exact condition on a primary-key field is rejected by the server, not routed to a property index as the new text implies. Evidence: static review of c87d249 against GraphTransaction.optimizeQuery(), ConditionQuery.matchUserpropKeys() and ConditionQuery.userpropValuesString() at 7f5a917; no server was run.

Comment thread content/en/docs/clients/restful-api/vertex.md

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Blocking: no. Summary: The edge coverage guidance needs one visibility qualification for parent indexes. Evidence: apache/hugegraph#3243 at 7f5a917; GraphIndexTransaction.collectMatchedIndexes() filters labels using rootOriginQuery() visibility before checkIndexCoverage().

Comment thread content/en/docs/clients/restful-api/edge.md Outdated

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.

3 participants