# What does "index order" (when sorting on \_doc) actually mean?

**URL:** <https://discuss.elastic.co/t/what-does-index-order-when-sorting-on--doc-actually-mean/90497>\
**Category:** Elasticsearch\
**Created:** [June 22, 2017, 4:30pm UTC](https://discuss.elastic.co/t/what-does-index-order-when-sorting-on--doc-actually-mean/90497 "2017-06-22T16:30:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrec](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@mrec](https://discuss.elastic.co/u/mrec)\
**Post date:** [June 22, 2017, 4:30pm UTC](https://discuss.elastic.co/t/what-does-index-order-when-sorting-on--doc-actually-mean/90497/1 "2017-06-22T16:30:31Z")

</div>

I'm guessing that it's the order in which that doc was (first? most recently?) inserted in the index, but would like to confirm that.

Context: I'm looking for a cheap default/secondary sort which will behave consistently for the same data even for separate copies of that data in separate indices each of which is populated by multiple loaders running in parallel. (This is mostly to keep things well-defined for regression testing.) Which I _think_ means I want `_uid` rather than the faster `_doc`.

---

<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:** [July 20, 2017, 4:30pm UTC](https://discuss.elastic.co/t/what-does-index-order-when-sorting-on--doc-actually-mean/90497/2 "2017-07-20T16:30:34Z")

</div>

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