I am trying to make a better search screen from my group collection in Firestore. In order to be able to search for different values I am creating an array within each document where I place values like name, difficulty, style, etc. so it is possible to search for any of those values.
Then, I have created a dataSheet with the group collection query and filtering the query with the “array-contains” taking the value of the dataSlot where I store the text that is placed in the search field. That works fine but I would like to improve it in two aspects:
-
You have to type the value exactly as it is written in the array, so if I write “queen” instead of “Queen”, it won’t show any result. Also the accents would be an obstacle. Would it be possible to make the search so it doesn’t matter if you write with or without accents and capitalized or not letters?
-
I have to type the entire name and it does not show results with partial match. For example, if an array contains “A million dreams”, I have to type exactly those three words, and it doesn’t show any document if I write just “million”. Can it be done like I expect it to work?
Thank you!