--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/873bafa6-3126-4189-9245-c31221f50b70o%40googlegroups.com.
Hi Rusheel,No this is not possible in Firestore and it's not currently on our roadmap. The best thing to do is issue two separate queries and merge them on the client. You may find this video helpful which explains how Firestore does indexing and why we allow / don't allow certain queries:
https://www.youtube.com/watch?v=Ofux_4c94FI- Sam
On Mon, Jun 8, 2020 at 9:10 AM Rusheel Shah <rushe...@gmail.com> wrote:
Hello,--I'm wondering about the query functionality in Firestore currently. I've been going through the docs and some articles and it seems like there is no way to complete OR logic on fields using just one query.For example if I have a user collection that looks like:User -> {auto-id} -> {phone: String, email: String},and I want to return all users where:(user.phone == "value1" || user.email == "value2"),I understand there's a whereIn clause where I could check multiple values on a single field, but I'm hoping to check multiple fields for a single value. It seems like this is not possible in a single query. Right now I'm chaining multiple queries (i.e. n queries for n fields).Is there anyway to complete the above task in one query?Thank you.
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fireba...@googlegroups.com.