You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (JIRA)" <ji...@apache.org> on 2017/08/30 10:31:00 UTC

[jira] [Updated] (TINKERPOP-1763) Order() not respected inside Match()

     [ https://issues.apache.org/jira/browse/TINKERPOP-1763?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stephen mallette updated TINKERPOP-1763:
----------------------------------------
    Component/s:     (was: server)
                 process

> Order() not respected inside Match()
> ------------------------------------
>
>                 Key: TINKERPOP-1763
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1763
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.2.6
>            Reporter: DOAN DuyHai
>
> {code}
> gremlin> graph = TinkerGraph.open()
> ==>tinkergraph[vertices:0 edges:0]
> gremlin> graph.io(graphml()).readGraph('/tmp/grateful-dead.xml')
> ==>null
> gremlin> g = graph.traversal()
> ==>graphtraversalsource[tinkergraph[vertices:808 edges:8049], standard]
> gremlin> g.V().match(
> ......1>     __.as("singers").hasLabel("artist"),
> ......2>     __.as("singers").in("sungBy").as("songs"),
> ......3>     __.as("songs").out("writtenBy").as("writters"),
> ......4>     __.as("writters").where(eq("singers")),
> ......5>     __.as("writters").dedup().order().by(inE("sungBy").count(), decr).as("ordered_writters")
> ......6> ).
> ......7> select("ordered_writters").
> ......8> project("writter_singer", "songs_count").
> ......9>   by("name").
> .....10>   by(inE("sungBy").count())
> ==>[writter_singer:Jorma_Kaukonen,songs_count:4]
> ==>[writter_singer:Hornsby,songs_count:4]
> ==>[writter_singer:Neal_Cassady,songs_count:1]
> ==>[writter_singer:Bob_Dylan,songs_count:22]
> ==>[writter_singer:Unknown,songs_count:6]
> ==>[writter_singer:John_Fogerty,songs_count:5]
> ==>[writter_singer:Joan_Baez,songs_count:10]
> ==>[writter_singer:Stephen_Stills,songs_count:2]
> ==>[writter_singer:Suzanne_Vega,songs_count:2]
> ==>[writter_singer:Etta_James,songs_count:1]
> ==>[writter_singer:Spencer_Davis,songs_count:2]
> ==>[writter_singer:Bo_Diddley,songs_count:7]
> ==>[writter_singer:Hunter,songs_count:3]
> ==>[writter_singer:Garcia,songs_count:146]
> ==>[writter_singer:Grateful_Dead,songs_count:17]
> ==>[writter_singer:Weir,songs_count:99]
> ==>[writter_singer:Mydland,songs_count:18]
> ==>[writter_singer:Lesh,songs_count:19]
> ==>[writter_singer:Pigpen,songs_count:36]
> ==>[writter_singer:Garcia_Lesh,songs_count:3]
> ==>[writter_singer:Donna_Godchaux,songs_count:2]
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)