On Aug 25, 2015, at 7:42 AM, Aj 
<[email protected]<mailto:[email protected]>> wrote:

Sometimes you really need to specify a key range one way and then sort a 
different way & paginate the query results. How can I achieve this? Applying 
sortDescriptor + limit to query doesn't gives me expected result.

Good point — the offset/limit are being applied before the in-memory sorting, 
which gives the wrong results. Could you file an issue on this, please?

However, the query isn’t going to be very efficient, since it’ll be generating 
the entire result set, sorting it, and then throwing away the results outside 
the current page. It may be better for you to keep the entire result set in 
memory and just display the relevant portions.

I observed that applying "limit + postFilter" gives gives limit+1 results. 
Shall I file a issue?

Weird! Must be an off-by-one error in there somewhere. Yes, definitely a bug, 
so file an issue please.

—Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/478CFF84-15AF-4AAE-8261-760E40AC98A7%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to