# Using tiebreakers in Kibana Discover or Logs

**URL:** https://discuss.elastic.co/t/using-tiebreakers-in-kibana-discover-or-logs/255441
**Category:** Kibana
**Created:** [November 15, 2020, 3:33pm UTC](https://discuss.elastic.co/t/using-tiebreakers-in-kibana-discover-or-logs/255441 "2020-11-15T15:33:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![MAE](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@MAE](https://discuss.elastic.co/u/MAE)
#### Post date: [November 15, 2020, 3:33pm UTC](https://discuss.elastic.co/t/using-tiebreakers-in-kibana-discover-or-logs/255441/1 "2020-11-15T15:33:06Z")

</div>

Hello everyone,  
I am regularly ingesting a pair of events with the same timestamp. If they are shown in the incorrect order, it's very confusing for the user.

Used versions are logstash-7.9.1 , kibana-7.9.1 and elasticsearch-7.9.1.

I added [this](https://stackoverflow.com/a/49896736) ruby-code in the logstash-config, which succesfully adds a seq - number.

Now my question is how I can use the tiebreaking mechanism to control which events are show first. I played with Stack Managment -\> Advanced Settings -\> context:tieBreakerFields. I tried "\_doc" , "\_doc, seq" , "seq, \_doc " but to no avail. A kibana restart was performed after every change.

Getting the ordering right in the logs-feature from x-pack would be nice too, but since the settings is labled "Discover" I think it is easier to get it working there.

Sample-Data:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/9/f94b50fc4ef779f60b81b992c7061e3f54501029.png)

With friendly regards,

MAE

---

<div class="post-metadata">

### Author: ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)
#### Post date: [November 16, 2020, 10:59am UTC](https://discuss.elastic.co/t/using-tiebreakers-in-kibana-discover-or-logs/255441/2 "2020-11-16T10:59:50Z")

</div>

Hi and welcome to our community!  
So the `context:tieBreakerFields` is just used by the functionality of Discover that shows you documents in context, you can access it here:

 ![Bildschirmfoto 2020-11-16 um 11.51.30](https://us1.discourse-cdn.com/elastic/original/3X/d/c/dc56f20c2baab1dd07fa4957ca1f4d045f492d16.png)

You can sort by it in Discover by clicking on the `seq`header, then it's added to the list of fields that the records are sorted by.

Hope this helps!  
Best,  
Matthias

---

<div class="post-metadata">

### Author: ![MAE](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@MAE](https://discuss.elastic.co/u/MAE)
#### Post date: [November 17, 2020, 7:59am UTC](https://discuss.elastic.co/t/using-tiebreakers-in-kibana-discover-or-logs/255441/3 "2020-11-17T07:59:23Z")

</div>

Thanks alot for the clarification,

after manually sorting by seq, it works👍  
If the exact ordering is required, using the view surrounding feature seems usefull.  
I am happy with this solution, thank you!  
Still wondering wether someone has found a solution for the same problem in the X-pack - logs application. I tried the suggestions from [this thread](https://discuss.elastic.co/t/kibana-logs-application-tiebreaker-field-grayed-out/228375/5).

Thank you,  
MAE

---

<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: [December 15, 2020, 7:59am UTC](https://discuss.elastic.co/t/using-tiebreakers-in-kibana-discover-or-logs/255441/4 "2020-12-15T07:59:59Z")

</div>

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