(Phonegap)Couchbase Lite query view Pagenation not working

Couchbase lite pagenation notworking.

Map Function As following:

                                        map: function (doc) {
                                            if (doc.type && doc.updatedOn&&doc.title) {
                                                         title: doc.title,
                                                         description: doc.description,
                                                         rev: doc._rev,
                                                         authorName:doc.author.firstname+" "+doc.author.lastName,

Pagenation try as .
but always returining same result.

Hi @shiva.050865

Could you provide the mobile platform (iOS/Android/Windows…) and Couchbase Lite version you are testing this with?


Could you provide the mobile platform (iOS/Android/Windows…) and Couchbase Lite version you are testing this with?

Thank you for quick response.

Am developing using ionic which support android/IOS but in both not working…
Version:1.3.0 (https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin.git)

Are you aware that with a descending query, startKey needs to be the maximum key in the range?

Also, the query string ends with &skip=1_all_docs, which doesn’t make any sense. Was that a copy-and-paste error?

Sorry while pasting by mistake 1_all_docs added… skip value is 1 and descending true… Yes from forum I got that point and using…

Note: But where Am checking from couchbase admin it is in reverse way startkey is minimum value even descending true.

Really? I’d be surprised if that were true, since it would break existing query code. The query API originates from CouchDB, and startkey has always been the maximum key in descending mode.

Do you mean key of last record or first record. ?

Yes lot of places I have found answer as you said but while I am testing from couchbase admin by creating development view it is working exactly opposite way. Does this behave based on version

Version info: Version: 4.1.0-5005 Community Edition (build-5005)

And once I complete all pagination it starting from first instead of showing “0” records.


Thank you it is working well… small mistake done from my end… instead of startkey using startKey…