Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Gremlin: from groupCount back to nodes

Received: by 10.50.85.196 with SMTP id j4mr7418076igz.4.1335695879552;
        Sun, 29 Apr 2012 03:37:59 -0700 (PDT)
X-BeenThere: neo4j@googlegroups.com
Received: by 10.50.188.164 with SMTP id gb4ls1673008igc.3.canary; Sun, 29 Apr
 2012 03:37:57 -0700 (PDT)
Received: by 10.50.159.133 with SMTP id xc5mr7418791igb.0.1335695877461;
        Sun, 29 Apr 2012 03:37:57 -0700 (PDT)
Received: by 10.50.159.133 with SMTP id xc5mr7418790igb.0.1335695877452;
        Sun, 29 Apr 2012 03:37:57 -0700 (PDT)
Return-Path: <neubauer.pe...@gmail.com>
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172])
        by gmr-mx.google.com with ESMTPS id hq2si4501970igc.3.2012.04.29.03.37.57
        (version=TLSv1/SSLv3 cipher=OTHER);
        Sun, 29 Apr 2012 03:37:57 -0700 (PDT)
Received-SPF: pass (google.com: domain of neubauer.pe...@gmail.com designates 209.85.210.172 as permitted sender) client-ip=209.85.210.172;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of neubauer.pe...@gmail.com designates 209.85.210.172 as permitted sender) smtp.mail=neubauer.pe...@gmail.com; dkim=pass header...@gmail.com
Received: by iazz13 with SMTP id z13so3637836iaz.31
        for <neo4j@googlegroups.com>; Sun, 29 Apr 2012 03:37:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:sender:in-reply-to:references:from:date
         :x-google-sender-auth:message-id:subject:to:content-type
         :content-transfer-encoding;
        bh=7qIS14Hv/oRRfjEVuXc8LJbnBUejKjM/0Kry8Xd5z6s=;
        b=EOc+N8BMRjmw3YNVD0BaKpiDCm8vhD0n77gUjhi2z28i5lhEv+NJWBU24d5ZpikHHg
         sKkLviHnJb6txXDCMBw1ev2dxr1Ior+oS4MwHaII8avolK8AZMtEulZsb7TddiVHItOH
         QgV6k3NhTP4MSQbtrTFFb8Lrl0687aCotyUZfYZzTmXT1mR3G3CijhIPy4UUt8kZ7hTj
         f+DYVZOCjmX5l8+AAZg0zHbM0fz2fMM9ubkBTr1mk3ptd80ix+00nFjd1RUv0LTQR0ok
         8DCEyr+7zl/ASl9JqfdJSTqGV9YLrFtGURXbBJ6SLue89V7vm50Qk5iV1LAIqzhoQDYz
         HhuA==
Received: by 10.50.106.200 with SMTP id gw8mr8191889igb.10.1335695877348; Sun,
 29 Apr 2012 03:37:57 -0700 (PDT)
MIME-Version: 1.0
Sender: neubauer.pe...@gmail.com
Received: by 10.231.187.84 with HTTP; Sun, 29 Apr 2012 03:37:37 -0700 (PDT)
In-Reply-To: <4F9C631F.2020...@ten.net.nz>
References: <4F9C631F.2020...@ten.net.nz>
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Sun, 29 Apr 2012 12:37:37 +0200
Message-ID: <CAF59RW6Mrq0G2K3CWaU_25mn22COijTECauC2ESgQtXd0f4...@mail.gmail.com>
Subject: Re: [Neo4j] Gremlin: from groupCount back to nodes
To: neo4j@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Mmh.
this is a normal groovy map you are getting back, have the nodes as
keys. So you should be able to do something like
http://stackoverflow.com/questions/4898062/get-key-in-groovy-maps

map.keySet() and then continue.

Cheers,

/peter neubauer

G: =A0neubauer.peter
S: =A0peter.neubauer
P: =A0+46 704 106975
L:=A0 =A0http://www.linkedin.com/in/neubauer
T: =A0 @peterneubauer

If you can write, you can code - @coderdojomalmo
If you can sketch, you can use a graph database - @neo4j


On Sat, Apr 28, 2012 at 11:37 PM, Alexei Tenitski <ale...@ten.net.nz> wrote=
:
> Hi there,
>
> Can someone please help me with groupCount.
>
> Here is a query which gets 10 most used tags
>
> g.V.filter{it.type=3D=3D'TAG'}.in('tagged').groupCount().cap().next().sor=
t{a,b
> -> b.value <=3D> a.value}[0..9]
>
> Response is
>
> =3D=3D> v[6815]=3D6
> =3D=3D> v[6789]=3D5
> =3D=3D> v[6778]=3D3
> =3D=3D> v[6269]=3D2
> =3D=3D> v[6791]=3D2
> =3D=3D> v[5991]=3D2
> =3D=3D> v[6281]=3D1
> =3D=3D> v[1028]=3D1
>
>
> How can I go back to nodes from here in order to retrieve additional data=
?
>
> Cheers,
> Alexei