【发布时间】:2020-09-21 08:18:22
【问题描述】:
最近我正在构建一个食谱应用程序。我使用 firebase 作为我的数据库。现在我想让用户找到我存储在我的食谱集合中的任何食谱。
每个 Food_Recipe 都有不同的子集合。我将用一个例子来解释我的问题。
现在,我想找到Recipe_name == Biiyani 的文件。 我可以使用这种方式轻松归档我的目标,
Query query = FirebaseFirestore.getInstance().collection("Recipes").document("Food_Recipe")
.collection("Rice_Recipe").orderBy("Recipe_name")
.startAt(InputSearchText).endAt(InputSearchText +"\uf8ff");
但我需要在食谱集合中获得相同的结果。 比如Justimaging,如果Powder_Recipe也有Recipe_name Biiyani,那么不同子集合应该有2个结果。
【问题讨论】:
-
请仅使用
android-studio标签来回答有关 Android Studio IDE 本身的问题。对于一般的 Android 编程问题,请使用android标签。
标签: android firebase google-cloud-firestore