【发布时间】:2018-03-30 13:06:32
【问题描述】:
寻找一种方法来索引 pouchDB
当我有多个维度时找不到索引方法
这是我的文档客户端示例
请注意,客户可能有几张发票
{
clientId : 2
clientName : 'toto'
phoneNumber : '2342342'
invoices : [
{
invoiceNumber : '12312313' ,
Amount : 234242,
barCode : '1234324',
},
{
invoiceNumber : '12312313' ,
Amount : 234242,
barCode : '1234324',
}
]
}
{
clientId : 3
clientName : 'tata'
phoneNumber : '2342342'
invoices : [
{
invoiceNumber : '3542435' ,
Amount : 234242,
barCode : '1234324',
},
{
invoiceNumber : '235423' ,
Amount : 234242,
barCode : '23454235',
}
]
}
我希望能够通过发票号码和条形码号码找到客户
所以索引这些很重要
感谢您的帮助
我看过https://pouchdb.com/api.html#create_index 和https://pouchdb.com/2014/05/01/secondary-indexes-have-landed-in-pouchdb.html
到目前为止运气并不好
【问题讨论】:
标签: javascript pouchdb