Hi @mjaimes, thanks so much for the example!
Indeed, as @francoischalifour mentioned, this is a bit of an anti-pattern for us. We make search as quick as possible by sorting results at indexing time as much as possible (rather than query time.) This way, when a query is run, results are pre-sorted to an extent and we can process the request within a matter of milliseconds.
You can do this by indexing attributes you would like to sort by (e.g. completion status) and then setting that attribute as either a custom ranking or sort by attribute, depending on exactly what you are going for. Would you be able to index/update the completion status of each item rather than grabbing this value on the front-end?
If you need to do this on the client-side (e.g. it varies for each client), it would probably be best to use the browse method rather than the search method, since this will allow you to grab all of your records, not just ones on a certain page.
The downside is that this is not compatible with our InstantSearch components out-of-the-box, and you would need to build out a lot of UI functionalities that they provide.
I hope this explains how we intend our system work and that one of the suggestions is do-able for you. Let us know if you have any further questions.