I'm not sure that this is working properly, when replication is involved. As far as I understood the _changes API it is only guaranteed to get the latest change to a document, not every single one. When replication is involved it is possible to miss a newly created document and only see an updated one (first part of the MVCC token >1), when it's being replicated to the node where the _changes feed is consumed from.
On 29.05.2010, at 05:04, Pavan Kumar wrote: > Thanks guys, will go the rev id split way as of now. > > On Fri, May 28, 2010 at 10:42 PM, J Chris Anderson <[email protected]> wrote: > >> >> On May 28, 2010, at 8:54 AM, Zachary Zolton wrote: >> >>> I was just thinking on this problem the other day.... >>> >>> The only thing I can think of is looking at the _rev of the document. >>> Unfortunately, the format of the _rev has changed in the past, and it >>> may change in the future. So I think we're supposed to treat it as an >>> opaque token. >>> >>> Hmm... Hopefully someone else has a better solution. >>> >> >> I've started to write code that depends on the fact that the rev is >> structured like "3-abcdefabcedef" (eg I've got some code that splits by "-", >> etc). >> >> So you could look for docs with a rev that starts with 1. I'm not sure how >> good an idea it is to do that... >> >>> --Zach >>> >>> On Fri, May 28, 2010 at 4:33 AM, Pavan Kumar <[email protected]> wrote: >>>> Hi , >>>> >>>> using _changes API with filters, can i detect if the document is a >> newly >>>> Created one or Modified one ? What i understand now is that for both of >> the >>>> scenarios ( new documents added or existing document changed ) _changes >> API >>>> will give a reply back. >>>> >>>> Is there a way to differentiate ? >>>> >>>> Thanks, >>>> Pavan >>>> >> >>
