# Presorting results

**URL:** https://discuss.elastic.co/t/presorting-results/169800
**Category:** Elasticsearch
**Created:** [February 25, 2019, 10:35am UTC](https://discuss.elastic.co/t/presorting-results/169800 "2019-02-25T10:35:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Raimon\_Bosch](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@Raimon\_Bosch](https://discuss.elastic.co/u/Raimon_Bosch)
#### Post date: [February 25, 2019, 10:35am UTC](https://discuss.elastic.co/t/presorting-results/169800/1 "2019-02-25T10:35:48Z")

</div>

Hi,

Imagine that we have an external algorithm that gives us the exact ordenation that we want on a set of documents. How would I query elastic to retrieve N documents exactly on that order?

Is the only solution include this 'score' in the index as a new field or could we ask to Elastic a list of ids in a specific order?

Cheers,

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 25, 2019, 10:35am UTC](https://discuss.elastic.co/t/presorting-results/169800/2 "2019-03-25T10:35:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
