I don't really understand your question?
Does the second query not work for you?
Michael
Am 09.08.2012 um 21:48 schrieb fli.rpx:
> I am trying to write a query to return nodes with two relationships.
>
> One way to do it: start a=node(1405) match a-[:A*1..3]->m, a-[:B*1..3]->m return distinct
m.name;
>
> This will work, but takes much a lot more time than a query like this: start a=node(1405) match a-[:A|B*1..3] return distinct m;
>
> I think maybe neo4j does two traversals in the first query.
yes it does and their results span up a cross product which is filtered down by distinct again.
>
> Is it possible to do a query to get nodes with both relationships like the second query?