# Ingest timestamp

**URL:** <https://discuss.elastic.co/t/ingest-timestamp/258526>\
**Category:** Elasticsearch\
**Tags:** ingest-pipeline\
**Created:** [December 14, 2020, 3:15am UTC](https://discuss.elastic.co/t/ingest-timestamp/258526 "2020-12-14T03:15:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hs01](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hs01/32/80785_2.png) [@hs01](https://discuss.elastic.co/u/hs01)\
**Post date:** [December 14, 2020, 3:15am UTC](https://discuss.elastic.co/t/ingest-timestamp/258526/1 "2020-12-14T03:15:14Z")

</div>

Is it possible for ingest timestamp (introduced via ingest pipeline) to be out of order with respect to actual index time (when a document becomes queryable)

i.e.,

```auto
doc_1 => ingest_time_t1
doc_2 => ingest_time_t2
ingest_time_t1 > ingest_time_t2

```

but search query returns t1 first (since that document gets indexed first)

The use case is to periodically read data from elastic search and do checkpointing regarding what data has been already read. Is it possible to solve this by introducing ingest timestamp, and using it for checkpointing?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 14, 2020, 6:08am UTC](https://discuss.elastic.co/t/ingest-timestamp/258526/2 "2020-12-14T06:08:23Z")

</div>

I suspect this will depend on how many primary shards the index have. Refreshes are not coordinated across primary shards in an index so it is possible that a later time stamp becomes searchable before an earlier one if they are on different primary shards.

---

<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:** [January 11, 2021, 6:08am UTC](https://discuss.elastic.co/t/ingest-timestamp/258526/3 "2021-01-11T06:08:23Z")

</div>

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