我正在传递过滤器值,但它始终匹配我需要可选匹配的两个字段
[ { "fieldName": "Firstname", "operator": "equals", "value": "Megh" }, { "fieldName": "Lastname", "operator": "contains",
"value": "doot " }]
我正在传递过滤器值,但它始终匹配我需要可选匹配的两个字段
[ { "fieldName": "Firstname", "operator": "equals", "value": "Megh" }, { "fieldName": "Lastname", "operator": "contains",
"value": "doot " }]
return $http ({
method: 'GET',
url: Backand.getApiUrl() + '/1/objects/users',
params: {
filter: {
"q": {
{
"$or": [ { "firstName": { "$eq": "Megh" } }, { "lastName": {"$like": "doot"} } ]
}
}
}
}
});
您可以进一步阅读: http: //docs.backand.com/en/latest/apidocs/nosql_query_language/
还有一个“搜索”参数对对象中的所有文本字段执行自由文本搜索。当您想在 UI 中提供自由文本搜索时很有用。
return $http ({
method: 'GET',
url: Backand.getApiUrl() + '/1/objects/users',
params: {
search: "something"
}
});