You may want to sort dynamically if you don't want to use standard replicas and virtual replicas are not exhaustive enough for your case. Your options are then sorting this yourself.
There isn't an option to sort an index using an API call.
The possible options are:
- returning all your data and sorting it after it is returned. You could build the UI for showing those hits after the data is returned and paginate from that set.
- returning your data page by page and sorting it after it is returned each time. You could build the UI as well