【发布时间】:2020-08-25 12:47:06
【问题描述】:
我必须使用对多个索引进行排序来查询 Hyperledger Fabric 中的 couchdb。我已经正确定义了所有索引,并尝试分别使用每个索引并且工作正常。但是,一旦我在一个查询中同时包含两个索引,它就会抛出错误:
Error:no_usable_index, Status Code:400, Reason:No index exists for this sort, try indexing by the sort fields.
这是我的查询不起作用:
{"selector":{"info":{"organization_id":"ABC123"},"status":{"$in":["STATUS1","STATUS2","STATUS3"]},"docType":"doc_awa"},"use_index":["_design/biltiDoc","indexbiltino"],"sort":[{"creation_date":"desc"},{"doc_no":"desc"}]}
请告诉我是否可以在查询中使用多个排序索引?
【问题讨论】:
标签: couchdb hyperledger-fabric hyperledger