firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.67k stars 3.97k forks source link

cloud_firestore: Allow where() to do prefix matching #2801

Closed jamesderlin closed 4 years ago

jamesderlin commented 4 years ago

I came across https://medium.com/flutterdevs/implement-searching-with-firebase-firestore-flutter-de7ebd53c8c9 which recommends manually generating all possible prefixes for a search term. I admittedly don't know anything about Firebase or cloud_firestore, but that approach sounds rather unergonomic and possibly inefficient.

Could Query.where have a startsWith or stringStartsWith parameter instead?

Salakar commented 4 years ago

Hey @jamesderlin, thanks for raising this feature request. Unfortunately this is out of scope of FlutterFire itself as we rely on the platform specific Firebase SDKs to provide functionality - so this would need to happen there first.

I'd recommend raising this as a feature request on the Firebase website: https://firebase.google.com/support/troubleshooter/report/features

Thanks