I copied the query in SearchApi.js' getApiData() for an article. Brad pointed out you can leave out
from the query and instead sort the elements of query.pages on their index key added in T75522: PrefixSearch should support paging.
Change 276384 had a related patch set uploaded (by Jdlrobson):
WIP: Cleanup use of prefixsearch in search
Change 276384 merged by jenkins-bot:
Simplify search logic for performance benefit