imbajin commented on code in PR #503:
URL: https://github.com/apache/hugegraph-doc/pull/503#discussion_r4302906836


##########
content/en/docs/clients/restful-api/vertex.md:
##########
@@ -367,14 +367,27 @@ 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 and checks additional property conditions on that vertex 
without a property index. If all primary-key fields have conditions but any of 
them
+uses a range condition, the query is rejected before property-index lookup, 
even if a matching property index exists.
+
+For other `properties` queries, the specified `label` needs a property index 
compatible with the query conditions. If `label` is omitted, candidate labels 
are
+query-visible vertex labels that declare all queried properties, including 
labels that currently have no vertices. Labels hidden from normal query results,
+including those being deleted, do not require coverage. A label index alone 
does not index properties.
+
+For query values compatible with the declared property types, no compatible 
index or partial candidate coverage produces an index error; complete coverage 
uses

Review Comment:
   Updated in 5e93292: Added a version note indicating that the 
partial-coverage error applies from the release containing 
apache/hugegraph#3243, while earlier versions return matches from indexed 
labels without raising an error, across all four pages (EN/CN vertex and edge 
docs).



##########
content/en/docs/clients/restful-api/edge.md:
##########
@@ -416,12 +416,26 @@ 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, candidate labels are query-visible edge labels that can hold edges 
and declare all queried properties, including labels that currently have no
+edges. Labels hidden from normal query results, including those being deleted, 
do not require coverage. A base (parent) edge label has no direct edges and does
+not need a separate index when its sub-labels are covered. A compatible index 
on a query-visible parent label can cover its sub-labels; compatible indexes on

Review Comment:
   Updated in 5e93292: Explicitly clarified that when `label` is specified, 
only indexes created on that label are used; when `label` is omitted, 
parent/sub-label coverage rules apply, in both EN and CN edge docs.



-- 
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]

Reply via email to