I am new to ReThink DB and trying to implement full text search using filter() and match() APIs.
Below is an example query I am using to find TV shows whose name starts with the word 'Evil':
r.db('test').table('tv_shows').filter(r.row('name').match('^Evil'))
For smaller datasets, this works fine but I am facing performance issues when data set is larger than a few hundred thousand rows.
I understand that filter() does not use indexes, but I am unable to figure out how to use getAll() / between() for text searches.
Another issue I have with this is that the search can be done on any field, so I cannot predict which columns to have the indexes on. How can I improve the performance of the above query in this case?
Note: I am trying to build an AG Grid Angular UI backed by the data from ReThink. So, users will have the ability to sort, filter and paginate on the data. Filtering can be done on any column and hence the static creation of indexes is not an option here.