How to create an index for a query that is changeable?


I have a query that is changeable. I have an API that takes a partial query string that is injected into the query when the API is called. For example the partial query would be something like personalDetail.firstName = ‘Damian’. The full query would be select * from write where personalDetail.firstName = ‘Damian’

You could then change the query to personalDetail.lastName = ‘Chapman’ or any other field of personalDetail.

Is it possible to create an index for a changeable query?


You have to create different indexes for each changeable query