Curl 如何使用非id字段查询CouchDB?

Curl 如何使用非id字段查询CouchDB?,curl,couchdb,couchdb-1.6,Curl,Couchdb,Couchdb 1.6,我有以下文件 { "_id": "00094248b3a7a744a88b2c77b1001c5d", type: 'contact', firstname: 'firstname', lastname: 'lastname', email: ['home': 'foobar@foobar.net', 'work': 'foobar@foobar-working.net'], phone: ['home': '+81 00 0000 0000'],

我有以下文件

{
   "_id": "00094248b3a7a744a88b2c77b1001c5d",
    type: 'contact',
    firstname: 'firstname',
    lastname: 'lastname',
    email: ['home': 'foobar@foobar.net', 'work': 'foobar@foobar-working.net'],
    phone: ['home': '+81 00 0000 0000'],
    address: [],
    files: [
        name : "SomeNAME",
        id : "SOMEID"
    ]

}
现在我想检索文件{id}=SOMEID的文档,如何使用curl实现这一点

请注意,我使用的是CouchDB 1.6,因此Mongo风格的查询对我不可用。

首先定义一个。临时查询是couchdb通常不会做的事情。 你可以找到一个例子,完整的地图功能