Support array-contains-prefix operator in Firestore
You can build a search index in a Firestore collection by storing an array of search words.
If you query this property using 'array_contains' you get exact matches for your search string.
If you wish to build a prefix search, then you potentially need to store all prefixes of the words you need to index.
Assuming that the array-contains is performing some kind of index scan, it would appear that it was possible to create an array-contains-prefix such that:
where('index', 'array-contains-prefix', 'fire')
would match the following documents
[
{ index: ["firestore", "database"],
...
},
{ index: ["firebase", "dog"],
...
}
This would fulfil most of my search indexing needs! :-)