简体   繁体   中英

couch db finding data without views

I want to know is there any way in Couch DB HTTP API to query database without VIEWS ? We can GET all documents / document with specific id but what if we want to query database with key other then ID, without using VIEWS ?

You cannot query a CouchDB database by anything other than primary key (ID) without using views. In CouchDB world, views are queries.

You can get the data from CouchDB without views using HTTP API of couchDB.

http://wiki.apache.org/couchdb/HTTP_Document_API

Documents stored in a CouchDB have a DocID. DocIDs are case-sensitive string identifiers that uniquely identify a document. Two documents cannot have the same identifier in the same database, they are considered the same document.

http://localhost:5984/test/some_doc_id
http://localhost:5984/test/another_doc_id
http://localhost:5984/test/BA1F48C5418E4E68E5183D5BD1F06476

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM