incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@danmyersconsulting.com
Subject Re: include_docs with _all_docs
Date Wed, 09 May 2012 18:02:28 GMT
I used that syntax and it worked, providing the following.

{"total_rows":1,"offset":0,"rows":[
{"id":"533603c44153340f53cfd6f0c2000a24","key":"533603c44153340f53cfd6f0c2000a24","value":{"rev":"3-b3fae01d3eee9a323966e5a952ac24fc"},"doc":{"_id":"533603c44153340f53cfd6f0c2000a24","_rev":"3-b3fae01d3eee9a323966e5a952ac24fc","Name":"Daniel
Myers","Email":"dan at danmyersconsulting.com","Notes":"Dan is a data
management professional..."}}
]}

but this is the whole document (both data and metadata). Isn't there
something that just gives me the list of attributes (metadata only) like
dictionary tables provide in relational databases? e.g. output would be:
"id","key","value","doc":{"_id","_rev","Name","Email","Notes"}

where id, key, value and doc are similar to a relational table-level
metadata and the _id, _rev, Name, Email and Notes are similar to
relational column-level metadata?

Dan M.

> _utils is a futon url (an admin application that ships with couch),
> not a couchdb url.
>
> http://host:port/testdb/_all_docs?include_docs=true
>
> B.
>
> On 9 May 2012 17:35,  <dan@danmyersconsulting.com> wrote:
>> Bryan/others,
>> Using the following I get a list of the documents:
>> http://********:****/_utils/database.html?testdb/_all_docs
>> <where testdb is the name of my database>
>>
>> but when I enter the include_docs=true I get an error, Not Found:missing
>> http://********:****/_utils/database.html?testdb/_all_docs&include_docs=true
>>
>> Besides wouldn't this give me metadata at that document level, but how
>> does that display attributes of documents because each document may have
>> a
>> unique number of attributes?
>>
>> Dan M
>>
>>> If you want to get the all_docs view you should use the include_docs
>>> parameter, which is normally a performance hit - is it also a
>>> performance hit with all_docs - if so why is it done that way?
>>>
>>> thanks,
>>> Bryan Rasmussen
>>>
>>
>


Mime
View raw message