On Sat, Dec 3, 2011 at 5:17 PM, jschweigl <johann.schwe...@gmail.com> wrote:

> I was afraid that this happened, because in the mail I got from the list
> containing my own post the query was missing as well. It was enclosed in
> raw
> text tags. Seems to be a bug in the forum software. Here is the query:
>
> START a=node:nodeIndex(_simpleType = 'something')
> MATCH path = a-[:BASED_ON]-b-[:CALLS]-c-[:WRAPS]-d
> RETURN path
>
> In plain text: return a path which matches the given relationship chain as
> far as possible, not necessarily up to the end node, if this is not
> possible.
>

Ah, now I understand.

Right, a path with nulls in it will itself be null. There's no quick way:

START a=node:nodeIndex(_simpleType = 'something')
MATCH a-[r1?:BASED_ON]-b-[r2?:CALLS]-c-[r3?:WRAPS]-d
RETURN a,r1,b,r2,c,r3,d

And then, in your host language, extract the non-null-parts.

Hope this helps,

Andrés
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to