Replacing the Sortable and Searchable Settings
We could add an action (or actions) that would be used in the query chain to detect poor-performing queries and return errors to the user.
For instance, this could have a list of indexed fields in the view and return an error if at least one of the fields is not provided in the query.
A similar mechanism could be implemented for sorting.
There are a couple of options for handling a bad query:
- send a error to the user
- abort the chain, which would display an empty result to the user (but no error)
- run a default query
- add something to the query to fix the performance problem