Yes, this allows specifying multiple relationship types -- as long as the
direction is the same. Thanks!

It would still be extremely useful to be able to specify this when the
directions also differ. (Or in some cases, the shapes of the path also
differ.)

Cheers,
Aseem

On Wed, Aug 24, 2011 at 6:04 PM, Andres Taylor <
andres.tay...@neotechnology.com> wrote:

> Forgot to mention it: We've changed ~TYPE to .TYPE. It's in out snapshot
> version. Just a heads up.
>
> Andrés
>
> On Wed, Aug 24, 2011 at 6:02 PM, Andres Taylor <
> andres.tay...@neotechnology.com> wrote:
>
> >
> >
> > On Wed, Aug 24, 2011 at 5:44 PM, Aseem Kishore <aseem.kish...@gmail.com
> >wrote:
> >
> >> Here's my use case: I want to show my friends' "comments" and "likes".
> >>
> >> For comments, I can do e.g. "(friend) -[:WROTE]-> (comment)", and for
> >> likes,
> >> I can do e.g. "(friend) -[:LIKES]-> (object)", but is there a way I can
> >> combine both these matches into one Cypher query? I know I can put
> >> multiple
> >> match clauses, but it's my understanding that that's an AND, not an OR.
> >>
> >> For this particular case, since the length/shape of the path is the same
> >> for
> >> both cases, being able to specify multiple choices for relationship type
> >> would work here, e.g. "(friend) -[:WROTE,:LIKES]-> (object)", where the
> >> returned object could potentially be a comment.
> >>
> >
> > What you can do if you want to OR relationship types is this:
> >
> > MATCH friend -[r]-> object
> > WHERE r~TYPE = "WROTE" or r~TYPE = "LIKES"
> >
> > I've been considering adding something like what you suggest. It's a good
> > idea - it's mostly a matter of picking the most important features first
> > right not.
> >
> > Thanks for your feedback - much appreciated!
> >
> > Andrés
> >
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to