0
我怎麼能指數嵌套的對象時,我嘗試在索引功能的doc
指數子屬性,如 ret.add(doc.complaint.status, {field: 'status', type: 'string'})
CouchDB的,Lucene的收益500
function (doc) {
var ret = new Document();
ret.add(doc.customerName, {
type: 'string',
field: 'customerName'
});
ret.add(doc.complaint.status, {
type: 'string',
field: 'status'
});
ret.add(doc.complaint.numberOfCoupons, {
type: 'int',
field: 'numberOfCoupons'
});
return ret;
}
存在於couchdb中的物體
{ "customerName": "Roman Maltsev", "complaint": { "status": "In progress", "numberOfCoupons": 10 } }
查詢使用代理 GET http://localhost:5984/_fti/local/complaints-management-rom/_design/find/all?q=status:"In progress"
收益500