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 while(itty.hasNext()) { itty.next() }
When you do sutff in the Gremlin terminal, the terminal will say: "oh, you
returned an iterator, let me iterate through the results for you."
See the first point in:
https://github.com/tinkerpop/gremlin/wiki/Troubleshooting
Question: where are you setting the variable 'n' ? Is that Gremlin plugin thing?
Hope that helps,
Marko.
http://markorodriguez.com
On Jun 15, 2011, at 1:08 PM, Marcelo Barbudas wrote:
> 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.
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user