incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <>
Subject Re: any good way of filtering out your own _changes?
Date Wed, 03 Oct 2012 14:51:33 GMT
On 3 October 2012 16:19, svilen <> wrote:
> g'day
> so i have a local db that replicates bidirectional with several others.
> an app uses local db, listens to _changes and also puts
> things sometimes. Any way to avoid it seeing it's own changes?
> i guess i can put a manual field e.g. "source" to *each* document or
> something... but that's not very neat. but may be the only way, hmmm -
> e.g. how to differ between different copies of same app.. running in
> parallel.
> ah, and any way to automaticaly sequence items? Even if "eventual" as in
> "eventual consistency"..
> Now i am putting a separate field for that ( =db.doc_count ) at each
> update, but i dont like it..

Use either a view (look up complex keys on the wiki for example), or
put it into the id of the doc:


> there is _local_seq in the document API that returns the sequenceid
> of the revision, but that is not accesible in views.. or actualy now i
> see it can be made accessible by adding extra options in the view
> definition. hmm i have to try that.

Seems like a better fit. A little more info on what you're trying to
achieve might give us some better ideas.


View raw message