imbajin commented on code in PR #503: URL: https://github.com/apache/hugegraph-doc/pull/503#discussion_r4316690678
########## content/en/docs/clients/restful-api/vertex.md: ########## @@ -367,14 +367,33 @@ 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 +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. If the specified `label`, or every candidate label, is hidden or being deleted, the query returns Review Comment: ⚠️ Blocking: no. Summary: This promise also covers an explicitly selected hidden or deleting label that does not declare every queried non-OLAP property, but that path does not return an empty result. Evidence: At apache/hugegraph#3243 head 3b597b76, isIndexQueryCandidate() returns false, so hadCandidates stays false; queryByUserprop() skips the visibility-only empty return and throws NoIndexException when no index matches. Please scope this to hidden/deleting labels that would otherwise be query candidates, or adjust the runtime behavior, and mirror the clarification across the four EN/CN Vertex/Edge 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]
