I want to query a document in Firestore using a regex. This is because in order to add a search functionality into my Flutter app, I need to be able to create a query based on the search. For example if the user types: 'alice' -- I would have a regex that would look like (?i)alice
and I would query firestore for any documents that the name field meets this regex, whether it be Alice, Alice Doe, or Doe Alice. I'm looking for a query that would look something like this:
Firestore.instance.collection('people')
.where('name', matchesRegex: '(?i)alice')
Thanks for any help. I feel like this is a pretty basic feature but I can't find it any where in the docs. And I really can't get all of the documents and search based off of that because the collection is very large, and I don't want to read that many documents.