# Sorting by something other than timestamp in Logs app

**URL:** https://discuss.elastic.co/t/sorting-by-something-other-than-timestamp-in-logs-app/257897
**Category:** Logs
**Created:** [December 7, 2020, 7:04pm UTC](https://discuss.elastic.co/t/sorting-by-something-other-than-timestamp-in-logs-app/257897 "2020-12-07T19:04:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ippolito](https://avatars.discourse-cdn.com/v4/letter/i/8edcca/32.png) [@ippolito](https://discuss.elastic.co/u/ippolito)
#### Post date: [December 7, 2020, 7:04pm UTC](https://discuss.elastic.co/t/sorting-by-something-other-than-timestamp-in-logs-app/257897/1 "2020-12-07T19:04:21Z")

</div>

Hi. Is there a way to sort by a different field in the Observability/Logs app? Since we have multiple logging servers feeding a kafka queue, our logs don't necessarily arrive in the same order they're generated. We'd like to use Filebeat's log.offset field as the tiebreaker, but the tiebreaker feature seems to be deprecated. Can someone point me to how to sort the logs in an order other than strictly timestamp?  
Thanks in advance,  
Mike

---

<div class="post-metadata">

### Author: ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)
#### Post date: [December 8, 2020, 10:13am UTC](https://discuss.elastic.co/t/sorting-by-something-other-than-timestamp-in-logs-app/257897/2 "2020-12-08T10:13:16Z")

</div>

Hi @ippolito,

there is currently no support for other sorting keys since several optimizations rely on the fact that it's a time series. If the timestamps in your indexed documents are not accurate, maybe you could improve your ingestion pipeline to extract the correct timestamps (i.e. those generated by the source) from the log message payload?

---

<div class="post-metadata">

### Author: ![ippolito](https://avatars.discourse-cdn.com/v4/letter/i/8edcca/32.png) [@ippolito](https://discuss.elastic.co/u/ippolito)
#### Post date: [December 8, 2020, 4:24pm UTC](https://discuss.elastic.co/t/sorting-by-something-other-than-timestamp-in-logs-app/257897/3 "2020-12-08T16:24:46Z")

</div>

OK, thanks Felix. There really isn't a way for us to change the ingestion pipeline, because many of the logs arrive with the same timestamp down to the millisecond, in which case we'd need the tiebreaker.

---

<div class="post-metadata">

### Author: ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)
#### Post date: [December 8, 2020, 7:13pm UTC](https://discuss.elastic.co/t/sorting-by-something-other-than-timestamp-in-logs-app/257897/4 "2020-12-08T19:13:23Z")

</div>

Hm, I understand that the limitation is annoying. For clarification, the tiebreaker is not deprecated, but the ability to configure it is. We found that it's easy to misunderstand and therefore wanted to stick with the lucene `_doc` value.

I'll think about whether we can introduce an additional monotonic field from ECS to use as the tiebreaker in the future, which works reliably for all use-cases.

---

<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 5, 2021, 7:13pm UTC](https://discuss.elastic.co/t/sorting-by-something-other-than-timestamp-in-logs-app/257897/5 "2021-01-05T19:13:48Z")

</div>

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