Hi Lvc@,
Below is the query i am using -
select from (traverse in('extracted_place') from (select from
ExtractedLocation where name ='Gaza') while $depth <= 1) where not
(isReTweet=true) limit 50
after encoding with gephi end point -
http://localhost:2480/gephi/dbname/sql/select%20%20from%20(traverse%20in(%27extracted_place%27)%20from%20(select%20from%20ExtractedLocation%20where%20name%20%3D%27Gaza%27)%20while%20%24depth%20%3C%3D%201)%20where%20not%20(isReTweet%3Dtrue)%20limit%2050
if you break this query, it should give me the result of max 51 nodes (50
limit is given for outer query and 1 node for inner query) and connected 51
edges which shows their relationships. This limit is working fine for nodes
and giving me expected nodes but it is giving those links also which are
not the part of this traversal.
Lets say if these 50 nodes (which are getting traversed through outer query
and are connected with one node of inner wuery) are connected with some
other 100 nodes, since i am traversing till these 50 nodes (restricted by
depth) so I am expecting only 50 links which are connecting these nodes to
the central nodes but it is giving the other 100 links also which is not
required and have not been asked.
Below is the result -
{"an":{"#12:445320":{"content":"http://goo.gl/h5NfEI\u000ahttp://goo.gl/XZWrgW\u000aGaza\u000aIn
this cold desolate hour\u000aKeep warm\u000aBurn a cere in Australia that
is effectivee
...","sentiment":-0.10591847,"time":1408458600000,"content_id":"wbMdgQfUAGc","source":"youtube","relevance":5.795923,"contentURL":"http://www.youtube.com/watch?v=wbMdgQfUAGc"}}}
{"an":{"#12:505677":{"content":"#Demonstration for #Gaza, 23 August,
Saturday #DowningStreet #London #Westminster #palestine @antizio_
@yvonneridley
http://t.co/nBdyNiUUpP","sentiment":0.0,"time":1408554524000,"content_id":"502140188643319809","source":"Twitter","relevance":247.5,"language":"en","contentURL":"www.twitter.com/BarbiRashid/status/502140188643319809"}}}
{"an":{"#12:387378":{"content":"\u25b6 Sid Ryan speaking at Protest for
Gaza, August 9, 2014 \u2013 YouTube
http://t.co/TIrgFH1PUH","sentiment":-0.33333334,"time":1407759102000,"content_id":"498803943234076672","source":"Twitter","relevance":86.166664,"language":"en","contentURL":"www.twitter.com/QaisGhanem/status/498803943234076672"}}}
{"an":{"#12:428264":{"content":"http://goo.gl/h5NfEI\u000ahttp://goo.gl/XZWrgW\u000aGaza\u000aIn
this cold desolate hour\u000aKeep warm\u000aBurn a
can","sentiment":-0.10591847,"time":1408409659000,"content_id":"6Z4DtoKy4YQ","source":"youtube","relevance":5.795923,"contentURL":"http://www.youtube.com/watch?v=6Z4DtoKy4YQ"}}}
{"an":{"#12:515383":{"content":"#Demonstration for #Gaza, 23 August,
Saturday #DowningStreet #boycott @BDSmovement @ReemKelani @YasinDin
#ICC4Israel
http://t.co/Xd3QeAt2Qi","sentiment":0.0,"time":1408554939000,"content_id":"502141928448589824","source":"Twitter","relevance":102.5,"language":"en","contentURL":"www.twitter.com/BarbiRashid/status/502141928448589824"}}}
{"an":{"#12:361554":{"content":"#Bangladesh #Jamaat-e islami demonstrations
rally today in Dhaka, against the Israeli barbaric genocide on in #Gaza!
http://t.co/3dc8hAx1gw","sentiment":-0.5,"time":1407738652000,"content_id":"498718170019278848","source":"Twitter","relevance":142.0,"language":"en","contentURL":"www.twitter.com/kewshukhinoy/status/498718170019278848"}}}
{"an":{"#12:512955":{"content":"#Demonstration for #Gaza, 23 August,
Saturday #DowningStreet @georgegalloway @jvplive @TraditionalJews
@TorahJews
http://t.co/c1ecC5Ve0p","sentiment":0.0,"time":1408554822000,"content_id":"502141435077222400","source":"Twitter","relevance":106.0,"language":"en","contentURL":"www.twitter.com/BarbiRashid/status/502141435077222400"}}}
{"an":{"#16:2":{"name":"Gaza"}}}
{"an":{"#12:519499":{"content":"#Demonstration for #Gaza, 23 August,
Saturday #DowningStreet @benabyad @Remroum @MaxBlumenthal @SaveGazaProject
http://t.co/jDTisPhYMM","sentiment":0.0,"time":1408555183000,"content_id":"502142948973502464","source":"Twitter","relevance":112.0,"language":"en","contentURL":"www.twitter.com/BarbiRashid/status/502142948973502464"}}}
{"an":{"#12:407414":{"content":"Police arrest two men after
","sentiment":-0.105240874,"time":1408081610000,"content_id":"9abDQbd7U6E","source":"youtube","relevance":5.7620435,"contentURL":"http://www.youtube.com/watch?v=9abDQbd7U6E"}}}
{"an":{"#12:267322":{"content":"Stand together for Gaza demonstration
Edinburgh Saturday 9 August, 2pm, In solidarity with the Palestinian
people, Assemble top of
Mound","sentiment":0.45883146,"time":1407508761000,"content_id":"497753939966963712","source":"Twitter","relevance":106.941574,"language":"en","contentURL":"www.twitter.com/PCS_Scotland/status/497753939966963712"}}}
{"an":{"#12:277711":{"content":"Photo: hadaes: theworldstandswithpalestine:
Melbourne protest for Gaza, July 19. 2014. everyone fucking...
http://t.co/pWtj1beALN","sentiment":-0.42426407,"time":1407516638000,"content_id":"497786977060937729","source":"Twitter","relevance":79.7132,"language":"en","contentURL":"www.twitter.com/nic_ftw/status/497786977060937729"}}}
{"an":{"#12:376770":{"content":"Poignant message by a Congress worker at
rally to protest against the killings in Gaza on Saturday, Aug 9
http://t.co/64iGHM6FmC","sentiment":0.0,"time":1407745778000,"content_id":"498748059677777920","source":"Twitter","relevance":90.5,"language":"en","contentURL":"www.twitter.com/wb_pcc/status/498748059677777920"}}}
{"an":{"#12:332947":{"content":"A special \"good morning\" to all those
people who are London-bound to protest at the carnage taking place in Gaza.
Well done to all of
you.","sentiment":-0.07779408,"time":1407565366000,"content_id":"497991357051727872","source":"Twitter","relevance":64.3897,"language":"en","contentURL":"www.twitter.com/reddeviljp/status/497991357051727872"}}}
{"ae":{"#18:136->#12:332947":{"directed":false,"source":"#12:332947","target":"#18:136"}}}
{"ae":{"#12:332947->#13:247444":{"directed":false,"source":"#13:247444","target":"#12:332947"}}}
{"ae":{"#18:152->#12:376770":{"directed":false,"source":"#12:376770","target":"#18:152"}}}
{"ae":{"#12:376770->#15:28":{"directed":false,"source":"#15:28","target":"#12:376770"}}}
{"ae":{"#12:376770->#13:278674":{"directed":false,"source":"#13:278674","target":"#12:376770"}}}
{"ae":{"#18:4->#12:277711":{"directed":false,"source":"#12:277711","target":"#18:4"}}}
{"ae":{"#12:277711->#13:208623":{"directed":false,"source":"#13:208623","target":"#12:277711"}}}
{"ae":{"#12:267322->#15:0":{"directed":false,"source":"#15:0","target":"#12:267322"}}}
{"ae":{"#12:267322->#13:201174":{"directed":false,"source":"#13:201174","target":"#12:267322"}}}
{"ae":{"#12:267322->#16:1":{"directed":false,"source":"#16:1","target":"#12:267322"}}}
{"ae":{"#12:267322->#16:0":{"directed":false,"source":"#16:0","target":"#12:267322"}}}
{"ae":{"#18:0->#12:267322":{"directed":false,"source":"#12:267322","target":"#18:0"}}}
{"ae":{"#18:1->#12:267322":{"directed":false,"source":"#12:267322","target":"#18:1"}}}
{"ae":{"#18:2->#12:267322":{"directed":false,"source":"#12:267322","target":"#18:2"}}}
{"ae":{"#12:407414->#13:171731":{"directed":false,"source":"#13:171731","target":"#12:407414"}}}
{"ae":{"#12:407414->#15:13":{"directed":false,"source":"#15:13","target":"#12:407414"}}}
{"ae":{"#12:407414->#15:12":{"directed":false,"source":"#15:12","target":"#12:407414"}}}
{"ae":{"#12:407414->#16:60":{"directed":false,"source":"#16:60","target":"#12:407414"}}}
{"ae":{"#18:78->#12:407414":{"directed":false,"source":"#12:407414","target":"#18:78"}}}
{"ae":{"#18:104->#12:407414":{"directed":false,"source":"#12:407414","target":"#18:104"}}}
{"ae":{"#18:415->#12:519499":{"directed":false,"source":"#12:519499","target":"#18:415"}}}
{"ae":{"#12:519499->#13:200252":{"directed":false,"source":"#13:200252","target":"#12:519499"}}}
{"ae":{"#12:528388->#16:2":{"directed":false,"source":"#16:2","target":"#12:528388"}}}
{"ae":{"#12:519499->#16:2":{"directed":false,"source":"#16:2","target":"#12:519499"}}}
{"ae":{"#12:519338->#16:2":{"directed":false,"source":"#16:2","target":"#12:519338"}}}
{"ae":{"#12:516933->#16:2":{"directed":false,"source":"#16:2","target":"#12:516933"}}}
{"ae":{"#12:510447->#16:2":{"directed":false,"source":"#16:2","target":"#12:510447"}}}
{"ae":{"#12:407414->#16:2":{"directed":false,"source":"#16:2","target":"#12:407414"}}}
{"ae":{"#12:376770->#16:2":{"directed":false,"source":"#16:2","target":"#12:376770"}}}
{"ae":{"#12:332947->#16:2":{"directed":false,"source":"#16:2","target":"#12:332947"}}}
{"ae":{"#18:248->#12:428264":{"directed":false,"source":"#12:428264","target":"#18:248"}}}
{"ae":{"#18:263->#12:428264":{"directed":false,"source":"#12:428264","target":"#18:263"}}}
{"ae":{"#18:252->#12:428264":{"directed":false,"source":"#12:428264","target":"#18:252"}}}
{"ae":{"#18:136->#12:387378":{"directed":false,"source":"#12:387378","target":"#18:136"}}}
{"ae":{"#12:387378->#14:4588":{"directed":false,"source":"#14:4588","target":"#12:387378"}}}
{"ae":{"#12:387378->#16:2":{"directed":false,"source":"#16:2","target":"#12:387378"}}}
{"ae":{"#12:387378->#15:29":{"directed":false,"source":"#15:29","target":"#12:387378"}}}
{"ae":{"#12:387378->#13:285641":{"directed":false,"source":"#13:285641","target":"#12:387378"}}}
{"ae":{"#18:415->#12:505677":{"directed":false,"source":"#12:505677","target":"#18:415"}}}
{"ae":{"#12:505677->#16:2":{"directed":false,"source":"#16:2","target":"#12:505677"}}}
{"ae":{"#12:505677->#12:510447":{"directed":false,"source":"#12:510447","target":"#12:505677"}}}
{"ae":{"#12:505677->#13:200252":{"directed":false,"source":"#13:200252","target":"#12:505677"}}}
{"ae":{"#12:445320->#13:324694":{"directed":false,"source":"#13:324694","target":"#12:445320"}}}
{"ae":{"#12:445320->#14:5619":{"directed":false,"source":"#14:5619","target":"#12:445320"}}}
{"ae":{"#12:445320->#14:5618":{"directed":false,"source":"#14:5618","target":"#12:445320"}}}
{"ae":{"#12:445320->#14:5617":{"directed":false,"source":"#14:5617","target":"#12:445320"}}}
{"ae":{"#12:445320->#14:5616":{"directed":false,"source":"#14:5616","target":"#12:445320"}}}
{"ae":{"#12:445320->#14:5615":{"directed":false,"source":"#14:5615","target":"#12:445320"}}}
{"ae":{"#12:445320->#14:5614":{"directed":false,"source":"#14:5614","target":"#12:445320"}}}
{"ae":{"#12:445320->#14:5613":{"directed":false,"source":"#14:5613","target":"#12:445320"}}}
{"ae":{"#12:445320->#14:5612":{"directed":false,"source":"#14:5612","target":"#12:445320"}}}
{"ae":{"#12:445320->#14:5611":{"directed":false,"source":"#14:5611","target":"#12:445320"}}}
{"ae":{"#12:445320->#14:5610":{"directed":false,"source":"#14:5610","target":"#12:445320"}}}
{"ae":{"#12:445320->#14:5609":{"directed":false,"source":"#14:5609","target":"#12:445320"}}}
{"ae":{"#12:445320->#16:2":{"directed":false,"source":"#16:2","target":"#12:445320"}}}
{"ae":{"#18:243->#12:445320":{"directed":false,"source":"#12:445320","target":"#18:243"}}}
{"ae":{"#18:248->#12:445320":{"directed":false,"source":"#12:445320","target":"#18:248"}}}
{"ae":{"#18:254->#12:445320":{"directed":false,"source":"#12:445320","target":"#18:254"}}}
{"ae":{"#18:252->#12:445320":{"directed":false,"source":"#12:445320","target":"#18:252"}}}
{"ae":{"#18:246->#12:445320":{"directed":false,"source":"#12:445320","target":"#18:246"}}}
{"ae":{"#18:247->#12:445320":{"directed":false,"source":"#12:445320","target":"#18:247"}}}
{"ae":{"#18:244->#12:445320":{"directed":false,"source":"#12:445320","target":"#18:244"}}}
{"ae":{"#18:273->#12:445320":{"directed":false,"source":"#12:445320","target":"#18:273"}}}
{"ae":{"#18:267->#12:445320":{"directed":false,"source":"#12:445320","target":"#18:267"}}}
{"ae":{"#18:266->#12:445320":{"directed":false,"source":"#12:445320","target":"#18:266"}}}
{"ae":{"#18:263->#12:445320":{"directed":false,"source":"#12:445320","target":"#18:263"}}}
{"ae":{"#12:445320->#16:5":{"directed":false,"source":"#16:5","target":"#12:445320"}}}
{"ae":{"#12:445320->#16:12":{"directed":false,"source":"#16:12","target":"#12:445320"}}}
{"ae":{"#12:445320->#16:16":{"directed":false,"source":"#16:16","target":"#12:445320"}}}
{"ae":{"#12:445320->#16:33":{"directed":false,"source":"#16:33","target":"#12:445320"}}}
{"ae":{"#12:445320->#16:50":{"directed":false,"source":"#16:50","target":"#12:445320"}}}
{"ae":{"#12:445320->#16:59":{"directed":false,"source":"#16:59","target":"#12:445320"}}}
{"ae":{"#12:445320->#16:141":{"directed":false,"source":"#16:141","target":"#12:445320"}}}
{"ae":{"#12:445320->#16:142":{"directed":false,"source":"#16:142","target":"#12:445320"}}}
{"ae":{"#12:445320->#16:143":{"directed":false,"source":"#16:143","target":"#12:445320"}}}
{"ae":{"#12:445320->#16:144":{"directed":false,"source":"#16:144","target":"#12:445320"}}}
{"ae":{"#12:445320->#15:52":{"directed":false,"source":"#15:52","target":"#12:445320"}}}
{"ae":{"#12:445320->#15:53":{"directed":false,"source":"#15:53","target":"#12:445320"}}}
{"ae":{"#18:247->#12:428264":{"directed":false,"source":"#12:428264","target":"#18:247"}}}
{"ae":{"#18:246->#12:428264":{"directed":false,"source":"#12:428264","target":"#18:246"}}}
{"ae":{"#18:254->#12:428264":{"directed":false,"source":"#12:428264","target":"#18:254"}}}
{"ae":{"#18:267->#12:428264":{"directed":false,"source":"#12:428264","target":"#18:267"}}}
{"ae":{"#18:266->#12:428264":{"directed":false,"source":"#12:428264","target":"#18:266"}}}
{"ae":{"#18:244->#12:428264":{"directed":false,"source":"#12:428264","target":"#18:244"}}}
{"ae":{"#18:243->#12:428264":{"directed":false,"source":"#12:428264","target":"#18:243"}}}
{"ae":{"#18:273->#12:428264":{"directed":false,"source":"#12:428264","target":"#18:273"}}}
{"ae":{"#12:428264->#16:2":{"directed":false,"source":"#16:2","target":"#12:428264"}}}
{"ae":{"#12:428264->#16:5":{"directed":false,"source":"#16:5","target":"#12:428264"}}}
{"ae":{"#12:428264->#16:12":{"directed":false,"source":"#16:12","target":"#12:428264"}}}
{"ae":{"#12:428264->#16:16":{"directed":false,"source":"#16:16","target":"#12:428264"}}}
{"ae":{"#12:428264->#16:33":{"directed":false,"source":"#16:33","target":"#12:428264"}}}
{"ae":{"#12:428264->#16:50":{"directed":false,"source":"#16:50","target":"#12:428264"}}}
{"ae":{"#12:428264->#16:59":{"directed":false,"source":"#16:59","target":"#12:428264"}}}
{"ae":{"#12:428264->#16:141":{"directed":false,"source":"#16:141","target":"#12:428264"}}}
{"ae":{"#12:428264->#16:142":{"directed":false,"source":"#16:142","target":"#12:428264"}}}
{"ae":{"#12:428264->#16:143":{"directed":false,"source":"#16:143","target":"#12:428264"}}}
{"ae":{"#12:428264->#16:144":{"directed":false,"source":"#16:144","target":"#12:428264"}}}
{"ae":{"#12:428264->#15:52":{"directed":false,"source":"#15:52","target":"#12:428264"}}}
{"ae":{"#12:428264->#15:53":{"directed":false,"source":"#15:53","target":"#12:428264"}}}
{"ae":{"#12:428264->#14:5070":{"directed":false,"source":"#14:5070","target":"#12:428264"}}}
{"ae":{"#12:428264->#14:5071":{"directed":false,"source":"#14:5071","target":"#12:428264"}}}
{"ae":{"#12:428264->#14:5072":{"directed":false,"source":"#14:5072","target":"#12:428264"}}}
{"ae":{"#12:428264->#14:5073":{"directed":false,"source":"#14:5073","target":"#12:428264"}}}
{"ae":{"#12:428264->#14:5074":{"directed":false,"source":"#14:5074","target":"#12:428264"}}}
{"ae":{"#12:428264->#14:5075":{"directed":false,"source":"#14:5075","target":"#12:428264"}}}
{"ae":{"#12:428264->#14:5076":{"directed":false,"source":"#14:5076","target":"#12:428264"}}}
{"ae":{"#12:428264->#14:5077":{"directed":false,"source":"#14:5077","target":"#12:428264"}}}
{"ae":{"#12:428264->#14:5078":{"directed":false,"source":"#14:5078","target":"#12:428264"}}}
{"ae":{"#12:428264->#14:5079":{"directed":false,"source":"#14:5079","target":"#12:428264"}}}
{"ae":{"#12:428264->#14:5080":{"directed":false,"source":"#14:5080","target":"#12:428264"}}}
{"ae":{"#12:428264->#13:313798":{"directed":false,"source":"#13:313798","target":"#12:428264"}}}
{"ae":{"#12:515383->#13:200252":{"directed":false,"source":"#13:200252","target":"#12:515383"}}}
{"ae":{"#12:515383->#12:519338":{"directed":false,"source":"#12:519338","target":"#12:515383"}}}
{"ae":{"#12:515383->#16:2":{"directed":false,"source":"#16:2","target":"#12:515383"}}}
{"ae":{"#18:415->#12:515383":{"directed":false,"source":"#12:515383","target":"#18:415"}}}
{"ae":{"#18:147->#12:361554":{"directed":false,"source":"#12:361554","target":"#18:147"}}}
{"ae":{"#18:146->#12:361554":{"directed":false,"source":"#12:361554","target":"#18:146"}}}
{"ae":{"#12:361554->#16:102":{"directed":false,"source":"#16:102","target":"#12:361554"}}}
{"ae":{"#12:361554->#16:2":{"directed":false,"source":"#16:2","target":"#12:361554"}}}
{"ae":{"#12:361554->#13:268419":{"directed":false,"source":"#13:268419","target":"#12:361554"}}}
{"ae":{"#12:512955->#13:200252":{"directed":false,"source":"#13:200252","target":"#12:512955"}}}
{"ae":{"#12:512955->#12:516933":{"directed":false,"source":"#12:516933","target":"#12:512955"}}}
{"ae":{"#12:512955->#16:2":{"directed":false,"source":"#16:2","target":"#12:512955"}}}
{"ae":{"#18:415->#12:512955":{"directed":false,"source":"#12:512955","target":"#18:415"}}}
{"ae":{"#12:267322->#16:2":{"directed":false,"source":"#16:2","target":"#12:267322"}}}
{"ae":{"#12:277711->#16:2":{"directed":false,"source":"#16:2","target":"#12:277711"}}}
here if you see, according to my query I should get only those links which
are in to the central node, I have given 'extracted_by' edge name to
connecting link between these two nodes. So according to my DB structure I
should get link which shows the relationship of "#16 and #12" but I am
getting #14, #15, #18 also.
Because of this it is taking lot of time to execute the query, for some of
the nodes I have more than 5k connecting nodes, so if you can suggest any
way out to rid of this it will be very helpful to me.
please let me know if any clarification is needed.
Thanks
On Wednesday, August 27, 2014 6:13:35 PM UTC+5:30, Lvc@ wrote:
>
> Hi Sachchidanand,
> To understand what you did the query could help. Can you write it here?
>
> Lvc@
>
>
> On 27 August 2014 13:16, sachchidanand singh <[email protected]
> <javascript:>> wrote:
>
>> Hi All,
>>
>> I am facing the same issue, I am limiting my traversal, but the result
>> which I am getting is unexpected, It shows the nodes according to the limit
>> i have provided but along with this it is showing all the links connected
>> to these nodes, for example if i have traversed to depth <=1 and limited it
>> by 10, but actually this node is connected with 100 other nodes(lets say),
>> then it will give result as all the 100 links along with these 10 nodes
>> even though i have queried for 10 only. so is there any way which can
>> restrict the unexpected links and i will get the only those links which are
>> falling in to my traversal.
>> I am using 1.6.0 SNAPSHOT and gephi end point.
>>
>> Thanks,
>> Sachchidanand singh
>>
>>
>> On Thursday, October 10, 2013 6:58:44 PM UTC+5:30, Brian O'Keefe wrote:
>>>
>>> Thanks Luca. I'll probably just wait for 1.6 general release and use my
>>> proxy for the proof of concept.
>>>
>>> On Wednesday, October 9, 2013 2:58:28 PM UTC-4, Lvc@ wrote:
>>>>
>>>> Hi Brian,
>>>> I think that output is because the edges are lightweight, namely have
>>>> no identity. You can avoid this with performance penalty by using:
>>>>
>>>> alter database custom useLightweightEdges=false
>>>>
>>>> Or you can pull last "develop" branch (or last 1.6.0-SNAPSHOT) where
>>>> this has been fixed.
>>>>
>>>> Lvc@
>>>>
>>>>
>>>> On 9 October 2013 11:49, Brian O'Keefe <[email protected]> wrote:
>>>>
>>>>> Luca,
>>>>>
>>>>> I worked around this issue by writing a proxy that intercepts the JSON
>>>>> being returned and substitutes a unique id for the edge id. However,
>>>>> that
>>>>> is not optimal and I tested this situation again using your suggestion of
>>>>> rewriting the query to:
>>>>>
>>>>> TRAVERSE * FROM (SELECT FROM V WHERE name='Me')
>>>>>
>>>>> Encoded: http://localhost:2480/gephi/testing/sql/TRAVERSE%20*%
>>>>> 20FROM%20(SELECT%20FROM%20V%20WHERE%20name%3D%27Me%27)%
>>>>> 20while%20%24depth%20%3C%3D%206/-1
>>>>>
>>>>> Again, the result is still duplicate edge ids:
>>>>>
>>>>> {"an":{"#11:2":{"name":"Paternal Grandfather"}}}
>>>>> {"an":{"#11:1":{"name":"Maternal Grandmother"}}}
>>>>> {"an":{"#11:0":{"name":"Maternal Grandfather"}}}
>>>>> {"an":{"#11:7":{"name":"Junior"}}}
>>>>> {"an":{"#11:6":{"name":"Me"}}}
>>>>> {"an":{"#11:5":{"name":"Dad"}}}
>>>>> {"an":{"#11:4":{"name":"Mom"}}}
>>>>> {"an":{"#11:3":{"name":"Paternal Grandmother"}}}
>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:5","target":"#11:3"}}}
>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:6","target":"#11:5"}}}
>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:6","target":"#11:4"}}}
>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:7","target":"#11:6"}}}
>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:4","target":"#11:0"}}}
>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:4","target":"#11:1"}}}
>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:5","target":"#11:2"}}}
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Brian
>>>>>
>>>>> On Monday, October 7, 2013 4:28:46 PM UTC-4, Lvc@ wrote:
>>>>>>
>>>>>> Hi Brian,
>>>>>> sorry I wrote the select statement instead of traverse. This is the
>>>>>> traverse:
>>>>>>
>>>>>> TRAVERSE both("IsParentOf") FROM (
>>>>>> SELECT FROM V WHERE name='Me'
>>>>>> ) WHILE $depth <= 6
>>>>>>
>>>>>> if you want the
>>>>>>
>>>>>> SELECT expand(rel) FROM (
>>>>>> TRAVERSE both("IsParentOf") as rels FROM (
>>>>>> SELECT FROM V WHERE name='Me'
>>>>>> ) WHILE $depth <= 6
>>>>>> )
>>>>>>
>>>>>> Lvc@
>>>>>>
>>>>>> On Monday, 7 October 2013, Brian O'Keefe wrote:
>>>>>>
>>>>>>> Thank you Luca. Is there a way to traverse N levels recursively
>>>>>>> using this model? For instance, I want to get the entire tree in this
>>>>>>> case, but in other cases I may want to get, say, 6 hops as it grows.
>>>>>>> This
>>>>>>> query seems to only provide the immediate parents/children. I tried
>>>>>>> "TRAVERSE * FROM (SELECT FROM V WHERE name='Me')" as well, but that
>>>>>>> also has the invalid edge ids. If there isn't an easy solution, I'll
>>>>>>> just
>>>>>>> create a proxy that rewrites the edge ids as a sequence.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Brian
>>>>>>>
>>>>>>> On Saturday, October 5, 2013 4:12:37 PM UTC-4, Lvc@ wrote:
>>>>>>>>
>>>>>>>> Hi Brian,
>>>>>>>> you could use the TRAVERSE command instead of Traverse() function:
>>>>>>>>
>>>>>>>> SELECT expand( both("IsParentOf") ) FROM V WHERE name='Me'
>>>>>>>>
>>>>>>>> Lvc@
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Lvc@
>>>>>>>>
>>>>>>>>
>>>>>>>> On 4 October 2013 10:21, Brian O'Keefe <[email protected]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> I'm not sure if I am doing this incorrectly, or if something is
>>>>>>>>> wrong with the Gephi plugin functionality, so I outline the steps to
>>>>>>>>> reproduce below:
>>>>>>>>>
>>>>>>>>> Assuming a local database exists called "Testing":
>>>>>>>>>
>>>>>>>>> 1. I create the schema
>>>>>>>>> CREATE CLASS Person extends V;
>>>>>>>>> CREATE CLASS IsParentOf extends E;
>>>>>>>>> CREATE PROPERTY Person.name STRING;
>>>>>>>>>
>>>>>>>>> 2. I add the vertices
>>>>>>>>> CREATE VERTEX Person SET name = 'Maternal Grandfather'
>>>>>>>>> CREATE VERTEX Person SET name = 'Maternal Grandmother'
>>>>>>>>> CREATE VERTEX Person SET name = 'Paternal Grandfather'
>>>>>>>>> CREATE VERTEX Person SET name = 'Paternal Grandmother'
>>>>>>>>> CREATE VERTEX Person SET name = 'Mom'
>>>>>>>>> CREATE VERTEX Person SET name = 'Dad'
>>>>>>>>> CREATE VERTEX Person SET name = 'Me'
>>>>>>>>> CREATE VERTEX Person SET name = 'Junior'
>>>>>>>>> CREATE VERTEX Person SET name = 'Neighbor'
>>>>>>>>>
>>>>>>>>> 3. I add the edges
>>>>>>>>> CREATE EDGE IsParentOf FROM (SELECT FROM Person where name =
>>>>>>>>> 'Maternal Grandfather') TO (SELECT FROM Person where name = 'Mom')
>>>>>>>>> CREATE EDGE IsParentOf FROM (SELECT FROM Person where name =
>>>>>>>>> 'Maternal Grandmother') TO (SELECT FROM Person where name = 'Mom')
>>>>>>>>> CREATE EDGE IsParentOf FROM (SELECT FROM Person where name =
>>>>>>>>> 'Paternal Grandfather') TO (SELECT FROM Person where name = 'Dad')
>>>>>>>>> CREATE EDGE IsParentOf FROM (SELECT FROM Person where name =
>>>>>>>>> 'Paternal Grandmother') TO (SELECT FROM Person where name = 'Dad')
>>>>>>>>> CREATE EDGE IsParentOf FROM (SELECT FROM Person where name =
>>>>>>>>> 'Mom') TO (SELECT FROM Person where name = 'Me')
>>>>>>>>> CREATE EDGE IsParentOf FROM (SELECT FROM Person where name =
>>>>>>>>> 'Dad') TO (SELECT FROM Person where name = 'Me')
>>>>>>>>> CREATE EDGE IsParentOf FROM (SELECT FROM Person where name = 'Me')
>>>>>>>>> TO (SELECT FROM Person where name = 'Junior')
>>>>>>>>>
>>>>>>>>> My goal is to get the part of the graph dealing with "Me and my
>>>>>>>>> family" (e.g., exclude "Neighbor")
>>>>>>>>> The query SELECT * FROM (TRAVERSE any() FROM (SELECT FROM V WHERE
>>>>>>>>> name='Me')) achieves this, so the url I query is:
>>>>>>>>> http://localhost:2480/gephi/testing/sql/SELECT%20*%20FROM%20
>>>>>>>>> (TRAVERSE%20any()%20FROM%20(SELECT%20FROM%20V%20WHERE%20name
>>>>>>>>> %3D%27Me%27))/-1
>>>>>>>>>
>>>>>>>>> The result is:
>>>>>>>>> {"an":{"#11:2":{"name":"Paternal Grandfather"}}}
>>>>>>>>> {"an":{"#11:1":{"name":"Maternal Grandmother"}}}
>>>>>>>>> {"an":{"#11:0":{"name":"Maternal Grandfather"}}}
>>>>>>>>> {"an":{"#11:7":{"name":"Junior"}}}
>>>>>>>>> {"an":{"#11:6":{"name":"Me"}}}
>>>>>>>>> {"an":{"#11:5":{"name":"Dad"}}}
>>>>>>>>> {"an":{"#11:4":{"name":"Mom"}}}
>>>>>>>>> {"an":{"#11:3":{"name":"Paternal Grandmother"}}}
>>>>>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:5","target":
>>>>>>>>> "#11:3"}}}
>>>>>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:6","target":
>>>>>>>>> "#11:5"}}}
>>>>>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:6","target":
>>>>>>>>> "#11:4"}}}
>>>>>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:7","target":
>>>>>>>>> "#11:6"}}}
>>>>>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:4","target":
>>>>>>>>> "#11:0"}}}
>>>>>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:4","target":
>>>>>>>>> "#11:1"}}}
>>>>>>>>> {"ae":{"#-1:-1":{"directed":false,"source":"#11:5","target":
>>>>>>>>> "#11:2"}}}
>>>>>>>>>
>>>>>>>>> The issue is that Gephi will only add the first edge, and then
>>>>>>>>> reports that "Edge added event ignored for edge #-1:-1: Edge already
>>>>>>>>> exi
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> ---
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>> Groups "OrientDB" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send an email to [email protected].
>>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>
>>>>>>> ---
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "OrientDB" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to [email protected].
>>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>>
>>>>>> --
>>>>>
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "OrientDB" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>
>>>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.