在Firestore中通过 AND 运算符通过 composite 过滤器使用json有效负载的正确方法
payload ={ "structuredQuery": {
"where" : {"compositeFilter":{
"op":"AND",
"filters":[
{ "fieldFilter":{"field" : {
"fieldPath" : "address",
},
"op": "EQUAL",
"value" : {"stringValue" :"gg"}
}
},
{"fieldFilter": {"field" :{
"fieldPath" : "name",
},
"op": "EQUAL",
"value" : {"stringValue" :"Abc"}
}
}],
}
},
"from" : [{"collectionId": "Test"}]
}
}
注意::我正在使用Firestore Rest API