# Two-level sort

**URL:** https://discuss.elastic.co/t/two-level-sort/38197
**Category:** Kibana
**Created:** [December 30, 2015, 10:24pm UTC](https://discuss.elastic.co/t/two-level-sort/38197 "2015-12-30T22:24:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bbach](https://avatars.discourse-cdn.com/v4/letter/b/d26b3c/32.png) [@bbach](https://discuss.elastic.co/u/bbach)
#### Post date: [December 30, 2015, 10:24pm UTC](https://discuss.elastic.co/t/two-level-sort/38197/1 "2015-12-30T22:24:33Z")

</div>

I'm trying to overcome the issue that logstash/elasticsearch will not store dates with microsecond resolution. In logstash, I've parsed the micosecond part of my timestamp and put it in a separate field (log\_usec). In kibana, I'd like to now do a two-level sort -- first by timestamp, then by log\_usec. Is this possible?

Closest I've come is based on a hint from here:

```
https://github.com/pauljb/logstash-filter-sequence

```

Using

```
/_search?sort=@timestamp,log_usec 

```

in my query URL gets close. The only issue is that the @timestamp is sorted descending and the log\_usec is sorted ascending. Thanks for any help with this. -- Bud

---

<div class="post-metadata">

### Author: ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)
#### Post date: [December 30, 2015, 10:29pm UTC](https://discuss.elastic.co/t/two-level-sort/38197/2 "2015-12-30T22:29:52Z")

</div>

Not yet, check out [https://github.com/elastic/kibana/issues/696](https://github.com/elastic/kibana/issues/696)

---

<div class="post-metadata">

### Author: ![bbach](https://avatars.discourse-cdn.com/v4/letter/b/d26b3c/32.png) [@bbach](https://discuss.elastic.co/u/bbach)
#### Post date: [December 31, 2015, 2:32pm UTC](https://discuss.elastic.co/t/two-level-sort/38197/3 "2015-12-31T14:32:52Z")

</div>

Thanks. I was hoping I was missing something... -- Bud

---

<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 6, 2017, 2:05pm UTC](https://discuss.elastic.co/t/two-level-sort/38197/4 "2017-07-06T14:05:47Z")

</div>


