Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1501

Add flag to the changes API to return only new changes



    • Skill Level:
      New Contributors Level (Easy)


      As discussed in this thread: http://mail-archives.apache.org/mod_mbox/couchdb-user/201206.mbox/%3CCAAOi-OHB6%3DYu%2Bt%3DWkiFAypQAfnv%3DQd-PL4tELZNL1C1-TQvtWw%40mail.gmail.com%3E

      I copy paste part of the conversation.

      I am subscribing to the _changes API. My database is quite big, and each time I restart my client, I get all old notifications. I only need the new notifications, since the moment that I subscribe to the feed.

      I have seen that there is a "since" parameter, but this is not helping me further, because I do not know what is the last document sequence number. So I would need one of the following:

      • a method to get the last sequence number to use as value for "since"
      • a flag to tell the _changes API to just give me the changed from now on. This would be the most clean solution, since it saves me a request to get the since parameter (which can be outdated anyway very fast). Is there something like this?

      I ended up going the GET /dbname route
      I guess there is no specific flag for the _changes API to request future changes...


          Issue Links



              • Assignee:
                benoitc Benoit Chesneau
                gonvaled Daniel Gonzalez
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: