0

I actually like Firebase quiet a lot, as it has a lot of potential. But as I've come learn, Firestore doesn't seem to allow you to perform quiet simple string queries through Flutter/Dart. Given that most SO related question posts tend to be quiet dated now, I wonder if I'm missing anything because not having the ability to perform very simple string regex/ignore-case searches is just absolutely insane! Now, I haven't had much luck performing anything but simple queries, but maybe I'm missing something here. And the idea of having to provide another third-party service access to the data just for search is totally ridiculous.

There is the firestore_search plugin that's now kind of dated, but I might give it a try. Still, this is very simple database functionality that should be available for any production quality database. Is this functionality actually available from firebase? Thanks!

ajam
  • 1
  • 1
  • No. Firestore can still only perform prefix queries on string values, not CONTAINS of suffix. It also can't execute regular expressions. If you need such operations, using a third party service to provide the is still the way to go. – Frank van Puffelen May 11 '23 at 22:30
  • @FrankvanPuffelen lots of thanks for your help! The combination of not been able to ignore casing plus not been able to use regexs is a major problem. Yeah, I could save all the fields I'm using in lower-case to simplify performing queries, and then fix the casing before presenting it. But that combined with the lack of regexs, that's bad! In my case, and I'm sure there's quite a lot of folks with the same need, having the ability of performing queries for a given piece of text at any point in the field strings is a must. This functionality will eventually appear, but who knows when. – ajam May 12 '23 at 00:21

0 Answers0