incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Pavlogiannis <paulogiann.couc...@gmail.com>
Subject Re: Get Document Size
Date Fri, 04 Dec 2009 09:46:26 GMT
That might work for a single document, but I  'd rather calculate the size
inside a map function so that I can then use a reduce to sum up.

2009/12/4 Sebastian Cohnen <sebastiancohnen@googlemail.com>

> what about doing a HEAD request and look for Content-Length?
>
> {~} I curl -I http://localhost:5984/test/DOCUMENT-ID
> HTTP/1.1 <http://localhost:5984/test/DOCUMENT-ID%0AHTTP/1.1> 200 OK
> Server: CouchDB/0.11.0b60a6b3e7-git (Erlang OTP/R13B)
> Etag: "1-1a6c2a80b8615b2399ff5ba66d18534d"
> Date: Fri, 04 Dec 2009 09:38:34 GMT
> Content-Type: text/plain;charset=utf-8
> Content-Length: 169
> Cache-Control: must-revalidate
>
>
> On 04.12.2009, at 10:17, Andreas Pavlogiannis wrote:
>
> > Hello,
> >
> > Is there a uniform way to obtain a document's size (attachments' size
> included) ?
> >
> > Thanks, Andreas
>
>

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