You can create are more complex structure too, so no need to use the graph
representation
e.g. return { start : n1, rel: MY_REL_TYPE, end: n2 }
Michael
Am 14.07.2014 um 17:11 schrieb Jason Gillman Jr. mackdaddydie...@gmail.com:
I'm guessing you just want some indication that there's a path (or no path)
between N1 and N2?
I guess a bit more context would help to determine what you're trying to do
exactly - what's the use case?
On Monday, July 14, 2014 1:01:13 AM UTC-4, Mars Agliullin wrote:
Hello, group
I have a use case for 'virtual' (i.e. created on the fly, not persistent in
DB) relationships. Say, we're looking for pairs of nodes (n1), (n2) in DB,
that are related somehow (e.g. traversable from n1 to n2). We're not
interested in intermediate nodes or relationships between n1 and n2. Besides
n1 and n2 (and their pairing) result set contains other components; e.g.:
match (n0)-[r]-(n1)-[*1..10]-(n2)
where ...
return n0, r, [n1, n2]
If graph format is used for results (good for its brevity), we either get the
whole subgraph including components of all paths from n1 to n2, which may be
huge and is not needed, or lose pairing between n1 and n2. A better
alternative would be to return n1, n2 and a 'virtual' relationship from n1 to
n2:
match (n0)-[r]-(n1)-[*1..10]-(n2)
where ...
return n0, r, n1, n2, relationship(n1, n2, Some label, { name: Some name
})
, where relationship() is a proposed function, returning 'virtual'
relationships.
Any ideas?
--
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.