I made a quick demonstration of how you can achieve this in bubble with a plugin. In the video I used my Plugin Data Jedi, but I suppose there are others that could be used to achieve the same result.
With this approach you do not need to alter your data structure and incur extra WU costs for that, nor do you have a restriction on the size of the dataset as you do not need to load the entire dataset, unless you want to and can instead just use some constraints on the search to only return the entries you want.