DEV Community

Discussion on: "array-contains-any" & "IN query" now on Firebase Firestore! Sample codes and demo.

Collapse
 
saslamp profile image
Abubakar Sambo

Hi,
In my case I'm searching for multiple, can't figure out how to go about it.

Like;

firebase
.firestore()
.collection("blogs")
.where("type, type2", "in", ["tweet", "podcast"] )
.get()

I've tried 'array-contains-any'. Doesn't seem to be the answer. Any help please

Collapse
 
nabettu profile image
nabettu

You can not use any where-in in one query.

You can use like query.

firebase
.firestore()
.collection("blogs")
.where("type", "==", "podcast" )
.where("tags", "in", ["tweet", "podcast"] )
.get()

sorry maybe cannot search multiple field.