Deleted docs return 404 when fetched, that's normal. If you're fetching an 
older revision than the latest, it will also be missing if you've compacted the 
database. 

Sent from my iPhone

> On 24 Dec 2016, at 17:32, Ian Goodacre <ian.gooda...@xtra.co.nz> wrote:
> 
> Hi all,
> 
> I am running CouchDB 1.6.1 on Linux.
> 
> I have a database that has many deleted documents and I am able to retrieve 
> most of these but there are a few that I am unable to retrieve. When I 
> attempt to retrieve these, I get 404 with error 'not_found' and reason 
> 'missing'.
> 
> I would like to understand why these few documents are different - why am I 
> unable to retrieve these deleted documents?
> 
> For example, _changes response includes:
> 
>    {
>      "deleted": true,
>      "changes": [
>        {
>          "rev": "2-338d783957e141566caf3662cc0726bb"
>        }
>      ],
>      "id": "assets_0000245",
>      "seq": 2355
>    },
> 
> 
> When I attempt to retrieve this with:
> 
> http://localhost:5984/dcm_assets_tp/assets_0000245?rev=2-338d783957e141566caf3662cc0726bb
> 
> I get a 404 response.
> 
> I am expecting to get the deleted document, even it if only contains _id, 
> _rev and _deleted.
> 
> Also, I don't understand the response to
> 
> curl --noproxy '*' -X GET 
> 'http://localhost:5984/dcm_assets_tp/assets_0000245?open_revs=all'
> 
> which is
> 
> --a341c8902ae323bd6ea7d938bc0c2ac5--
> 
> And I get the same in response to
> 
> http://localhost:5984/dcm_assets_tp/assets_0000245?revs=true&open_revs=all
> 
> But, if I add -H 'Accept: application/json' then I get an empty array ([]):
> 
> curl --noproxy '*' -X GET -H 'Accept: application/json' 
> 'http://localhost:5984/dcm_assets_tp/assets_0000245?open_revs=all'
> 
> 
> I must be misunderstanding something (or a lot of things). Any help would be 
> appreciated.
> 
> Regards,
> Ian
> 

Reply via email to