imbajin commented on code in PR #503: URL: https://github.com/apache/hugegraph-doc/pull/503#discussion_r4312049185
########## content/en/docs/clients/restful-api/vertex.md: ########## @@ -367,14 +367,30 @@ 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 (`P.eq` and +`P.within` count as exact values), 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 is not an exact value (`P.neq`, `P.gt`, `P.between`, `P.textcontains` and similar), 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 Review Comment: ⚠️ Important: These coverage rules also include OLAP properties, but HugeGraph shares OLAP indexes when the read mode exposes OLAP data. In GraphIndexTransaction, requiredIndexProperties() removes OLAP keys from per-label coverage and collectMatchedIndex() adds schema-wide OLAP indexes, so a query can use the shared index without each candidate label declaring or indexing that property. Please qualify this guidance for the shared OLAP path and mirror the exception in Chinese. -- 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]
