| Okay here is my latest concoction: START n=node(127) MATCH(n)-[:friends]->(x) WITH n, collect(distinct x) as friends MATCH(n)-[:outer_only_friends]->(y) WITH n, collect(distinct y) as outer, friends RETURN collect(friends + outer) as stuff and it works! Is there any available syntax to subtract outer from friends? Effectively using a minus sign in place of the plus sign? I tried that. It throws a "Don't know how to subtract" error right now. Any help
would be appreciated. Thanks. Chris |
--
--
| Sounds good. I'll put something together and send it over. Chris --- On Sat, 8/18/12, Peter Neubauer <peter.n...@neotechnology.com> wrote: |
|
| Okay, I've run into a couple problems 1) When I run this RETURN collect (inner + outeronly + friends + outer) as total, filter(x in blocked + pending : x in total)") I get this ... NativeException: org.neo4j.cypher.SyntaxException: blocked + pending expected to be of type IterableType<AnyType> but it is of type ScalarType from org/neo4j/cypher/internal/commands/Expression.scala:37:in `dependencies' I meant to mention that earlier. My query with the collections returns an interesting Java/Scala thing that took some Ruby magic to get to. 2) I attempted to recreate the Cypher query and sample data set for Peter in console but it didn't like me returning
collections. http://console.neo4j.org/?id=ngb7xt As always any help would be greatly appreciated. |
|
|
Okay, I've run into a couple problems 1) When I run thisRETURN collect (inner + outeronly + friends + outer) as total, filter(x in blocked + pending : x in total)")I get this ... NativeException: org.neo4j.cypher.SyntaxException: blocked + pending expected to be of type IterableType<AnyType> but it is of type ScalarTypefrom org/neo4j/cypher/internal/commands/Expression.scala:37:in `dependencies'