Is it possible to query multiple fields in a firestore document for the same value?
Imagine I have numerous documents where each described a sport:
s
One way to do something like that would be to restructure your data like so:
["bowling" : [
"ball": true, "bowling alley": true, "bowling shoes": true,
"description": "bowl the ball" ]]
and then query for documents where "ball" is equal to true
:
Firestore.firestore().collection("sports").whereField("ball", isEqualTo: true)
Firestore doesn't support substring, regular expression, or full text search types of queries. Those kind of searches don't scale with the way Firestore manages its indexes.
If you need fully text searching, consider duplicating your data into a search engine such as Algolia. This type of solution is discussed in the Firebase docs.