Google Firestore: Query on substring of a property value (text search)
Asked 07 September, 2021
Viewed 2.8K times
  • 60
Votes

I am looking to add a simple search field, would like to use something like

collectionRef.where('name', 'contains', 'searchTerm')

I tried using where('name', '==', '%searchTerm%'), but it didn't return anything.

21 Answer