incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randall Leeds <randall.le...@gmail.com>
Subject Re: Where do deleceted docs go
Date Thu, 29 Oct 2009 05:47:37 GMT
Aaaannnd... grepping the source gets me the answer in about 30 seconds.

If my Erlang literacy serves me right, it looks like:
POST /db/_purge
with body: {'doc1': ['1-42793874', '2-2348759', ... ], 'doc2': ['8-12341',
'10-850234']}

Just tried it on my machine and it appears to work fine with 0.10.0.

The only thing that bothers me is that requesting a document with ?revs=true
returns a list of rev "ids" which are only the part of the rev after the
dash (eg '28a4512efc7' instead of '3-28a4512efc7') but in order to purge a
document you have to specify the full revision identifier with both parts.
?rev_info=true gives you access to this information, but why isn't it
returned with ?revs=true?

-Randall

On Wed, Oct 28, 2009 at 22:28, Randall Leeds <randall.leeds@gmail.com>wrote:

> I don't see any purge api documented anywhere?
> Can someone explain how this works or where I can find info?
> As always, I'd gladly update the wiki.
>
> -Randall
>
>
> On Wed, Oct 28, 2009 at 05:42, Paul Davis <paul.joseph.davis@gmail.com>wrote:
>
>> On Wed, Oct 28, 2009 at 8:39 AM, Paul Davis <paul.joseph.davis@gmail.com>
>> wrote:
>> > On Wed, Oct 28, 2009 at 8:29 AM, Thomas Delaet <thomas@delaet.org>
>> wrote:
>> >> If I understand this correctly, the fact that you can not rely on
>> >> deleted documents being available cripples the synchronization
>> >> mechanism.
>> >
>> > Compaction only removes the body of deleted documents. Revisions are
>> > kept around specifically for this reason.
>> >
>> > HTH,
>> > Paul Davis
>> >
>>
>> Also, on a side note, for people wanting the "remove this document in
>> such a matter that replication will *not* delete the document in the
>> target db" you want to use the purge API. This is generally *not* what
>> most people should use. Purge exists for things like rebalancing nodes
>> in a cluster. Effectively operations that want to 'reparent' a docid
>> to a different shard or some such.
>>
>> Paul Davis
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message