Using LIMIT/SKIP with UNION

37 views
Skip to first unread message

Ziv Unger

unread,
May 9, 2014, 10:38:00 AM5/9/14
to ne...@googlegroups.com
I'm having some issues with a fairly complex query, which is using UNION combined with a SKIP / LIMIT for paging.

The problem is that given a query like this:

MATCH
RETURN
ORDER BY

UNION

MATCH
RETURN
ORDER BY

SKIP 5
LIMIT 5

The skip and limit will apply only to the latter match query, and not the entire result set of the union, which is what I'm after. Am I missing something obvious? In SQL I'd wrap brackets around the entire union, but Cypher won't accept that.

Many thanks

Michael Hunger

unread,
May 9, 2014, 3:01:50 PM5/9/14
to ne...@googlegroups.com
It's planned to be worked on, right now it's not supported.

Sent from mobile device
--
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 neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ziv Unger

unread,
May 10, 2014, 1:49:15 AM5/10/14
to ne...@googlegroups.com
Ah, that's unfortunate. Is there another way of accomplishing paging in this manner? Or is the feature reasonably close to release?


--
You received this message because you are subscribed to a topic in the Google Groups "Neo4j" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neo4j/NpPldhyc-ac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neo4j+un...@googlegroups.com.

Michael Hunger

unread,
May 10, 2014, 2:15:26 AM5/10/14
to ne...@googlegroups.com
Right now only using order by and limit for each part and ignoring the duplicate

Or rewriting your query so that union is not needed

Sent from mobile device
Reply all
Reply to author
Forward
0 new messages