Michael,

I run 2.0.2 . Eventually I figured how to put the ids in a list: 
[id1,id2,id3...] and run in one query. However, I don't know if UNION 
supports ORDER BY like shown in the query above.

On Monday, May 5, 2014 8:52:30 PM UTC-4, Michael Hunger wrote:
>
> Alex,
>
> what version are you using? and how exactly do you run this query?
>
>
> On Mon, May 5, 2014 at 7:55 PM, Alx <[email protected] <javascript:>>wrote:
>
>> I have the following UNION query:
>>
>> MATCH (n:User{id:'1'}) - [r:FRIEND]->() RETURN n.name AS Username, 
>> COUNT(r) AS Friends_Num ORDER BY Friends_Num DESC UNION
>> MATCH (n:User{id:'2'}) - [r:FRIEND]->() RETURN n.name AS Username, 
>> COUNT(r) AS Friends_Num ORDER BY Friends_Num DESC
>>
>> when I ran this I get the following exception:
>>
>> *BadInputException*
>>
>> *The statement has been closed.*
>>
>> *StackTrace:
>> org.neo4j.server.rest.repr.RepresentationExceptionHandlingIterable.exceptionOnHasNext(RepresentationExceptionHandlingIterable.java:50)
>> org.neo4j.helpers.collection.ExceptionHandlingIterable$1.hasNext(ExceptionHandlingIterable.java:46)
>> org.neo4j.helpers.collection.IteratorWrapper.hasNext(IteratorWrapper.java:42)
>> org.neo4j.server.rest.repr.ListRepresentation.serialize(ListRepresentation.java:71)
>> org.neo4j.server.rest.repr.Serializer.serialize(Serializer.java:75)
>> org.neo4j.server.rest.repr.MappingSerializer.putList(MappingSerializer.java:61)
>> org.neo4j.server.rest.repr.CypherResultRepresentation.serialize(CypherResultRepresentation.java:83)
>> org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresentation.java:41)
>> org.neo4j.server.rest.repr.OutputFormat.assemble(OutputFormat.java:215)
>> org.neo4j.server.rest.repr.OutputFormat.formatRepresentation(OutputFormat.java:147)
>> org.neo4j.server.rest.repr.OutputFormat.response(OutputFormat.java:130)
>> org.neo4j.server.rest.repr.OutputFormat.ok(OutputFormat.java:67)
>> org.neo4j.server.rest.web.CypherService.cypher(CypherService.java:101)
>> java.lang.reflect.Method.invoke(Method.java:606)
>> org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:139)
>> org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112)
>> java.lang.Thread.run(Thread.java:724)*
>>
>>
>> Is there any other way to run the query with multiple user ids (1,2,3...)?
>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to