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