[ 
https://issues.apache.org/jira/browse/TINKERPOP-1387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15526955#comment-15526955
 ] 

Daniel Kuppitz commented on TINKERPOP-1387:
-------------------------------------------

Hmm, {{select("a")}} selects all a's. Hence {{path().from("a")}} should also 
use all a's. Let me use an easier example:

{code}
gremlin> g.V().as('a').out().as('a').out().as('b').path().from('a').to('b')
==> [[v[1],v[4],v[5]],[v[4],v[5]]]
==> [[v[1],v[4],v[3]],[v[4],v[3]]]
{code}

{{.from("a").to("a")}} is crazy though.

> from and to modulators for path steps
> -------------------------------------
>
>                 Key: TINKERPOP-1387
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1387
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.2.1
>            Reporter: Daniel Kuppitz
>
> Just had this crazy idea of {{from}} and {{to}} modulators for path steps.
> {code}
> g.V(1).as("a").
>   
> repeat(both("knows").simplePath().from("a")).emit().out("created").as("p").in("created").
>   
> repeat(both("knows").simplePath().from("p")).emit(hasId(6)).out("created").as("b").
>   path().from("a").to("p").as("pathFromMarkoToProject").
>   path().from("p").to("b").as("pathFromProjectToPeter").
>   match(
>     __.as("pathFromMarkoToProject").count(local).is(lte(3)),
>     __.as("pathFromProjectToPeter").count(local).is(lte(3))
>   ).select("p", "pathFromMarkoToProject", "pathFromProjectToPeter")
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to