How about something like this:

START a=node(448091), b=node(6573222)
MATCH p=allshortestpaths((a)-[*..10]-(b))
// all nodes
UNWIND nodes(p) as n
// remove duplicates
WITH distinct n
// expand
MATCH p2=(n)-[*..2]-(m)
UNWIND nodes(p) as n
WITH distinct n
LIMIT 1000
MATCH (n)-[r]-(m)
RETURN n,r,m



On Sun, Jun 1, 2014 at 11:26 PM, John Fry <frydom.j...@gmail.com> wrote:

> I think ideally it would help if I could get the subgraph results in the
> following format (i.e. basically a list of relation properties with src and
> dst nodes):
>
>
> +---------------------------------------------------------------------------------------------+
> | from                                  | to
>                                |  rel_prop                  |
>
> +---------------------------------------------------------------------------------------------+
> | Node[x]{}                          | Node[a]{}                     |
> :link[q]{val}              |
> | Node[x]{}                          | Node[b]{}                     |
> :link[r]{val}              |
> | Node[y]{}                          | Node[z]{}                     |
> :link[s]{val}              |
>
> If the subgraph was delivered like this then I could easily load the
> subgraph into my java application for processing with something like this
> example:
> //
> https://github.com/neo4j/neo4j/blob/2.1.1/community/cypher/docs/cypher-docs/src/test/java/org/neo4j/cypher/example/JavaQuery.java
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to