简体   繁体   English

沙发数据库查找数据没有意见

[英]couch db finding data without views

I want to know is there any way in Couch DB HTTP API to query database without VIEWS ? 我想知道Couch DB HTTP API有没有办法在没有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 ? 我们可以获取具有特定id的所有文档/文档,但是如果我们想要使用除了ID之外的密钥来查询数据库,而不使用VIEWS呢?

You cannot query a CouchDB database by anything other than primary key (ID) without using views. 如果不使用视图,则无法通过主键(ID)以外的任何方式查询CouchDB数据库。 In CouchDB world, views are queries. 在CouchDB世界中,视图是查询。

You can get the data from CouchDB without views using HTTP API of couchDB. 您可以使用couchDB的HTTP API从CouchDB获取没有视图的数据。

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

Documents stored in a CouchDB have a DocID. 存储在CouchDB中的文档具有DocID。 DocIDs are case-sensitive string identifiers that uniquely identify a document. DocID是区分大小写的字符串标识符,用于唯一标识文档。 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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