I have several two-way relations in my schema. I want to get both roles from all relations where at least one role has a specific type.
Here’s my query: match $relation relates $role1; $relation relates $role2; $ent type my-type; $ent plays $role1; get $role1, $role2;
But some results have the same role for $role1 and $role2. I would like to add a clause like: $role1 != $role2; or not {$role1 role $role2;};. But I get errors. What’s the right syntax for this? Or maybe there’s a better way to do this query?
Thanks! I tried but failed to find this in the documentation (Match Clause | Vaticle). Is it documented somewhere else? There are lots of nice examples there, but doesn’t seem to be comprehensive. Some BNF or similar definition of the syntax would be nice to have in the docs I think.