contrueCT commented on code in PR #503: URL: https://github.com/apache/hugegraph-doc/pull/503#discussion_r4163105816
########## content/en/docs/clients/restful-api/vertex.md: ########## @@ -367,14 +367,23 @@ PUT http://127.0.0.1:8080/graphspaces/DEFAULT/graphs/hugegraph/graph/vertices/"1 #### Params - label: Vertex type -- properties: Property key-value pairs (precondition: indexes are created for property queries) +- properties: Property key-value pairs (see index coverage below) - keep_start_p: Default is false. When set to true, the range matching input expression will not be automatically escaped. For example, `properties={"age":"P.gt(18)"}` will be interpreted as an exact match, i.e., the age property is equal to the string "P.gt(18)" - offset: Offset, default is 0 - limit: Maximum number of results, default is 100 - page: Page number All of the above parameters are optional. `page` can not be combined with a non-zero `offset`, everything else can be combined in any way. +If `label` selects a vertex label with the `PRIMARY_KEY` ID strategy and `properties` supplies exact values for all its primary-key fields, +the query looks up the vertex by ID. Additional property conditions are checked on that vertex and do not need a property index. + +For other `properties` queries, the specified `label` needs a property index compatible with the query conditions. If `label` is omitted, +every vertex label that declares all queried properties needs a compatible index, even if that label currently has no vertices. A label index +alone does not index the properties. No compatible index produces an index error; partial coverage also produces an index error instead of Review Comment: Fixed in 4eb19f4d across all four English/Chinese Vertex/Edge pages. The coverage guarantee is now explicitly scoped to values compatible with declared property types. The text explains that a type-incompatible value may return an empty result after an index matches, before partial coverage is checked, while no matching index still raises the index error. It also describes query-visible candidates in line with the paired code fix. Strict Hugo build and rendered-content checks passed. ########## content/en/docs/clients/restful-api/edge.md: ########## @@ -416,12 +416,21 @@ It is not possible to delete an attribute that is not set as nullable. - vertex_id: Vertex ID - direction: Edge direction (OUT | IN | BOTH), default is BOTH - label: Edge label -- properties: Key-value pairs of properties (requires pre-built indexes for property queries) +- properties: Key-value pairs of properties (see index coverage below) - keep_start_p: Default is false. When set to true, the range matching input expression will not be automatically escaped. For example, `properties={"age":"P.gt(0.8)"}` will be interpreted as an exact match, i.e., the age property is equal to "P.gt(0.8)" - offset: Offset, default is 0 - limit: Number of queries, default is 100 - page: Page number +Without `vertex_id`, a `properties` query searches edges globally. The specified `label` needs a property index compatible with the query +conditions. If `label` is omitted, every edge label that declares all queried properties needs compatible index coverage, even if that label Review Comment: Fixed in 4eb19f4d in both Edge pages. Candidates are query-visible labels that can directly hold edges, including currently empty labels. A base parent has no direct edges and needs no additional index when its sub-labels are covered; either a compatible parent index or compatible indexes on every candidate sub-label can provide coverage. Ordinary empty labels are still candidates. Strict Hugo build and rendered-content checks passed. ########## content/cn/docs/clients/restful-api/edge.md: ########## @@ -422,12 +422,19 @@ PUT http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/graph/edges/S1:ma - vertex_id: 顶点 id - direction: 边的方向 (OUT | IN | BOTH),默认为 BOTH - label: 边的标签 -- properties: 属性键值对 (根据属性查询的前提是预先建立了索引) +- properties: 属性键值对(索引覆盖要求见下文) - keep_start_p: 默认为 false,当设置为 true 后,不会自动转义范围匹配输入的表达式,例如此时 `properties={"age":"P.gt(0.8)"}` 会被理解为精确匹配,即 age 属性等于 "P.gt(0.8)" - offset:偏移,默认为 0 - limit: 查询数目,默认为 100 - page: 页号 +未指定 `vertex_id` 时,`properties` 在全图范围查询边。如果指定了 `label`,该边标签需要有与查询条件匹配的属性索引。如果未指定 `label`,所有声明了全部待查属性的边标签 Review Comment: Fixed in 4eb19f4d. The new Chinese Vertex/Edge paragraphs now wrap only after sentence-ending punctuation, including the PRIMARY_KEY paragraph. No site-wide CJK configuration change was needed. The strict Hugo Extended 0.165.0/Go 1.27.1 build passed; checks on the rendered coverage paragraphs and sentence-ending source wraps passed for both Chinese pages. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
