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
Query for returning a subgraph of a particular relationship around a given node
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Didymus  
View profile  
 More options Jul 23 2012, 3:07 pm
From: Didymus <thomas.math...@ideanotion.net>
Date: Mon, 23 Jul 2012 12:07:13 -0700 (PDT)
Local: Mon, Jul 23 2012 3:07 pm
Subject: Query for returning a subgraph of a particular relationship around a given node

Hi,
Let me first preface this by saying that I am new to using neo4j. I have
looked a little bit into the docs and couldn't figure out a query that
expresses exactly what I wanna do. I would like to know the easiest way to
perform a query/queries that returns a subgraph of a particular
relationship around a given node with a limit on the max length of an
unconnected path (a path which doesn't connect back to the start).
Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Graph01  
View profile  
 More options Jul 23 2012, 3:57 pm
From: Graph01 <yevgeni.no...@gmail.com>
Date: Mon, 23 Jul 2012 12:57:38 -0700 (PDT)
Local: Mon, Jul 23 2012 3:57 pm
Subject: Re: Query for returning a subgraph of a particular relationship around a given node

Try gremlin. This query will return a subgraph (just the nodes) of length 4
around node 400:

g.v(400).as('origin').both('REL').dedup.loop('origin'){it.loops<=4}

You can use "aggregate" to save the edges of the subgraph.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Jul 23 2012, 5:28 pm
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Mon, 23 Jul 2012 22:28:26 +0100
Local: Mon, Jul 23 2012 5:28 pm
Subject: Re: [Neo4j] Re: Query for returning a subgraph of a particular relationship around a given node

or cypher:

start n=node(400)
match p = n-[:REL*4]-m
return distinct m

for just the nodes contained in the subgraph, or
return p

for all the paths from the start-node

Michael

Am 23.07.2012 um 20:57 schrieb Graph01:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »