incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <d...@muse.net.nz>
Subject Re: access a field of a document
Date Mon, 13 Sep 2010 08:21:40 GMT
On 11 September 2010 21:11, Robert Newson <robert.newson@gmail.com> wrote:
> You can achieve the PUT side with an update handler and the GET side
> with a show function.
>
> http://wiki.apache.org/couchdb/Document_Update_Handlers
> http://wiki.apache.org/couchdb/Formatting_with_Show_and_List
>
> B.

Thanks Rob - mea culpa on the update handler... oops this looks like
it was added in 0.10 then - awesome.

The show presumably needs to be created in the ddoc in advance, or is
there a clever way around that?

cheers, Dave

> On Fri, Sep 10, 2010 at 11:41 PM, Dave Cottlehuber <dave@muse.net.nz> wrote:
>> On 11 September 2010 02:32, Robert Wierschke <wierob83@googlemail.com> wrote:
>>> Hi,
>>>
>>> can I update/add a specific field of a document without GET the old version
>>> of the complete document and PUT the new version. E.g. something like
>>>
>>> curl -X GET http://localhost:5984/mydb/mydocument/newfield -d {"newfild":
>>> "new value"}
>>
>> No. You need to PUT the whole doc. You can avoid most of the fetch if
>> you don't need the original doc, by just getting HEAD.
>>
>>> Is it possible to GET a specific field without creating a view that selects
>>> the field?
>>
>> No.
>>
>>> kind regards
>>> robert
>>
>> cheers
>> Dave
>>
>

Mime
View raw message