spmallette opened a new pull request, #3574:
URL: https://github.com/apache/tinkerpop/pull/3574

   The `properties()`-step section in the reference documentation lists three 
examples run against The Crew graph, but the surrounding prose only states that 
`properties()` "extracts properties from an `Element`". It never explains two 
things a reader needs in order to predict the output:
   
   1. `properties()` changes the traversal stream so that it contains 
`VertexProperty` elements rather than the original `Vertex` elements.
   2. A `VertexProperty` is itself an `Element`, so it can carry its own 
properties — meta-properties — which is why `has('endTime')` and `valueMap()` 
applied after `properties('location')` filter and read the meta-properties of 
each vertex property, not the vertex's own properties.
   
   Without this, it is not obvious why 
`g.V(1).properties('location').valueMap()` returns four rows of 
`startTime`/`endTime` maps and why adding `has('endTime')` reduces that to 
three.
   
   This change:
   
   - Expands the intro prose to describe the `Vertex` -> `VertexProperty` 
stream transformation and the meta-property concept.
   - Cross-references the existing vertex-properties and The Crew toy-graph 
sections rather than duplicating them.
   - Adds callouts to the three examples so the four-rows-to-three-rows 
filtering is explained alongside the live output.
   
   The examples remain executable (`[gremlin-groovy,theCrew]`), so the rendered 
output stays self-verifying. Built the reference book locally and confirmed the 
section renders coherently: `properties('location').valueMap()` shows four rows 
and `properties('location').has('endTime').valueMap()` shows three.
   
   Scoped to the `properties()`-step section; no neighboring steps were touched.


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

Reply via email to