We have a multilingual IOS and Android Parse app which we are migrating to Firebase.
Users can change the locale of the app and so they can also search with words in their own language.
In Parse we use the regex query on a String
field (ex. "auto, car, coche, 汽车, carro, voiture) of the objects.
IOS:
query!.whereKey("stringIndex", matchesRegex: searchTerm.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()))
Android:
query.whereMatches("stringIndex", searchText.trim().toLowerCase());
How can we do this in firebase and how can we structure the data to get the search result we need?
Thanks in advance!
Updated
The only possibility we have for now is structuring our keywords-data like this
Our only concern is if firebase, can handle this when you have 100,000 keywords when a user does an offline search?