You can’t use reduce or group on an all-docs query*. I think you’d have to make 
a view that just emits the doc’s sequence as its key, then query that.
(Which to me seems like too much overhead just to provide a progress bar, but 
that’s your call!)

You could always make a rough estimate of the count by subtracting the starting 
sequence number from the database’s lastSequenceNumber. That will give you the 
correct number if no document was updated more than once; otherwise it’ll be an 
overestimate.

—Jens

* In CBL 2.0 you’ll be able to! Something like “count(*) where _sequence > 
$lastSequence”.

-- 
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/F2B95401-1EFA-4061-8AEE-8E854D928ED8%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to