Ios 索引存储多个值
假设我有一个如下所示的数组Ios 索引存储多个值,ios,swift,google-cloud-firestore,Ios,Swift,Google Cloud Firestore,假设我有一个如下所示的数组 postedAt: 241242 categories: - gaming: true - history: true - sports: true 是否可以创建看起来像这样的firestore索引 类别。*降序:true 或者我必须为类别中的每个可能值创建索引吗 非常感谢您的帮助。是的 let data: [String: Any] = [ "postedAt": 241242, "categories": [ "gaming":
postedAt: 241242
categories:
- gaming: true
- history: true
- sports: true
是否可以创建看起来像这样的firestore索引
类别。*降序:true
或者我必须为类别中的每个可能值创建索引吗
非常感谢您的帮助。是的
let data: [String: Any] = [
"postedAt": 241242,
"categories": [
"gaming": true,
"history": true,
"sports": true,
]
]
Firestore.firestore().collection("users/data").addDocument(data)