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

   ## Summary
   
   Improves the `path()`-step documentation in the reference book 
(`reference/the-traversal.asciidoc`).
   
   The first `path()` example uses `g.V().both().path().by('age')` and carries 
a callout explaining why the result count is smaller than expected. The 
previous wording — "the age property is not productive for all vertices and 
therefore those values are filtered" — reads as if only the missing *values* 
are omitted from otherwise-intact paths. In fact the filtering is at the 
*traverser* level: when any element of a path lacks a productive value for the 
`by()`-projected property, the whole path (traverser) is dropped. That is why 
the result count falls from 12 to 4.
   
   ## Changes
   
   - Reworded callout 1 so it unambiguously describes traverser-level filtering 
(the entire path is removed, not just the missing value), and notes the 
resulting 12 → 4 drop.
   - Added the standard modern-graph setup lines (`graph = 
TinkerFactory.createModern()` / `g = traversal().withEmbedded(graph)`) to the 
example block so the snippet is self-contained, matching the convention used by 
other examples in the book.
   
   ## Notes
   
   - Scope is limited to the `path()`-step section's first callout and its 
example setup. The Path Data Structure section is unchanged.
   - Verified against the modern graph: `g.V().both().count()` returns 12, and 
`g.V().both().path().by('age')` returns 4 paths (only the person↔person `knows` 
pairs survive; every path touching a software vertex, which has no `age`, is 
dropped in full).


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