mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
In oder to use lucene's utilities to merge top docs the results need to be passed in a dense array where the index corresponds to the shard index in the result list. Yet, we were sorting results before merging them just to order them in the incoming order again for the above mentioned reason. This change removes the obsolet sort and prevents unnecessary materializing of results.