考虑遵循员工文档结构
{
"_id":...,
"rev":...,
"type":"Employee",
"fName":...,
"lName":...,
"designation":...,
"department":...,
"reportingTo":...,
"isActive":..,
more attributes
more attributes
}
并在名为“Employee”的视图中遵循地图功能
function(doc) {
if (doc.type=="Employee") {
emit({
"EID":doc._id,
"FirstName":doc.fName,
"LastName":doc.lName,
"Designation":doc.designation,
"Department":doc.department,
"ReportingTo":doc.reportingTo,
"Active":doc.isActive
},
null
);
}
};
我想根据发射属性的任何组合和顺序查询此视图(查询可能包括一些随机属性,可能像鸭子打字)。可能吗?如果是这样,请让我知道一些示例或链接。
谢谢