我有数据,比如其中一组是:
{
"creatorUsername": "mbalex99",
"description": "For Hikers and All the Lovers Alike!",
"imageUrl": "https://s3.amazonaws.com/edenmessenger/uploads/28C03B77-E3E9-4D33-A433-6522C0480C16.jpg",
"isPrivate": true,
"name": "Nature Lovers ",
"roomId": "-KILq0nBN8wHQuEjMYRF",
"usernames": {
"bannon": true,
"loveless": true,
"mbalex99": true,
"terra": true
},
"objectID": "-KILq0nBN8wHQuEjMYRF"
}我似乎找不到密钥等于mbalex99的mbalex99
发布于 2016-06-01 10:15:53
在阿尔戈里亚,这确实是不可能的。您只能按值进行筛选。
但是,您肯定可以添加一个数组,其中包含对象的键,并通过以下属性进行筛选:
"usernames": {
"bannon": true,
"loveless": true,
"mbalex99": true,
"terra": true
},
"usernameList": ["bannon", "loveless", "mbalex99", "terra"]
// ...和
// At query time:
{ "facetFilters": "usernameList:mbalex99" }https://stackoverflow.com/questions/37553308
复制相似问题