Re: [Neo4j] gremlin rest plugin and map

2011-06-15 Thread Peter Neubauer
Yes, I am thinking along the lines of the Cypher return tables, see http://docs.neo4j.org/chunked/snapshot/cypher-plugin.html in which there is a column with Node representations, and a column with just a String, etc. Cheers, /peter neubauer GTalk:      neubauer.peter Skype       peter.neubauer

Re: [Neo4j] gremlin rest plugin and map

2011-06-15 Thread Marcelo Barbudas
Tables look great. Just right now googled them. Will they return something JSON encoded like [ row, row ], where row is [ hash, hash ]? -m. On 06/15/2011 11:13 PM, Peter Neubauer wrote: > Great! > > I plan to upgrade to Gremlin 1.1 tomorrow if the source is with me, > and add support even for

Re: [Neo4j] gremlin rest plugin and map

2011-06-15 Thread Peter Neubauer
Great! I plan to upgrade to Gremlin 1.1 tomorrow if the source is with me, and add support even for the table() return construct, so you can do the full shebang there :) Cheers, /peter neubauer GTalk:      neubauer.peter Skype       peter.neubauer Phone       +46 704 106975 LinkedIn   http://ww

Re: [Neo4j] gremlin rest plugin and map

2011-06-15 Thread Marcelo Barbudas
I was doing something wrong on my end. I could see the resulting map but with different values in the web console from the rest plugin. It turns out there was a lingering variable in the web console that I forgot to reset and now I am getting the same values. Thanks Peter. -m. On 06/15/2011 11:

Re: [Neo4j] gremlin rest plugin and map

2011-06-15 Thread Peter Neubauer
Well, you get as the result from your expression whatever the last statement is, since from a script, there is only one return construct. You could try putting things into a map or so ( both the count and the list of nodes) and return that? Alternatively, we could send back all bound variables in

Re: [Neo4j] gremlin rest plugin and map

2011-06-15 Thread Marcelo Barbudas
Hey Peter, I think I understand. So that means I can get a sort listed of nodes (the contents of m keys), but not the actual number on which the sorting was based (m values)? -m. On 06/15/2011 10:46 PM, Peter Neubauer wrote: > Marcelo, > the Gremlin plugin is transforming the results from a que

Re: [Neo4j] gremlin rest plugin and map

2011-06-15 Thread Peter Neubauer
Marcelo, the Gremlin plugin is transforming the results from a query into Neo4j REST conform structures, while the console is a pure command line interpreter, outputting strings that are not consumable by clients. Does that make sense? Cheers, /peter neubauer GTalk:      neubauer.peter Skype   

Re: [Neo4j] gremlin rest plugin and map

2011-06-15 Thread Marcelo Barbudas
> > n.outE.inV.inE.outV.groupCount(m) >> -1;m.sort{a,b -> b.value <=> a.value} Yep, this versions runs and returns. However the returned values from the web interface are different from the ones via the gremlin plugin. -m. ___ Neo4j mailing list User@

Re: [Neo4j] gremlin rest plugin and map

2011-06-15 Thread Marko Rodriguez
Oops. n.outE.inV.inE.outV.groupCount(m) >> -1;m.sort{a,b -> b.value <=> a.value} NOT n.outE.inV.inE.outV.groupCount(m);m.sort{a,b -> b.value <=> a.value} >> -1 I didn't see the semicolon. Marko. On Jun 15, 2011, at 1:12 PM, Marko Rodriguez wrote: > Hi, > > The trick to Gremlin is to know th

Re: [Neo4j] gremlin rest plugin and map

2011-06-15 Thread Marcelo Barbudas
Hey Marko, Wow, that was an *unbelievably* fast response. Amazing. > Question: where are you setting the variable 'n' ? Is that Gremlin plugin > thing? > It's unrelated to the neo4j plugin. Just an easy way for me to set up a starting node. -m. ___

Re: [Neo4j] gremlin rest plugin and map

2011-06-15 Thread Marko Rodriguez
Hi, The trick to Gremlin is to know that an expression is an Iterator and thus, must be iterated. n.outE.inV.inE.outV.groupCount(m);m.sort{a,b -> b.value <=> a.value} Should be: n.outE.inV.inE.outV.groupCount(m);m.sort{a,b -> b.value <=> a.value} >> -1 >> -1 is equivalent to

[Neo4j] gremlin rest plugin and map

2011-06-15 Thread Marcelo Barbudas
Hello neo4j, I'm trying to run via the gremlin server plugin a query like: m=[:];n.outE.inV.inE.outV.groupCount(m);m.sort{a,b -> b.value <=> a.value}; m; This doesn't output anything. I tried m.keySet() and that doesn't return anything either. Any ideas how I could make this work? -m. _