# Vertical COALESCING

**URL:** <https://discuss.elastic.co/t/vertical-coalescing/132516>\
**Category:** Elasticsearch\
**Created:** [May 18, 2018, 4:18pm UTC](https://discuss.elastic.co/t/vertical-coalescing/132516 "2018-05-18T16:18:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mc84](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@mc84](https://discuss.elastic.co/u/mc84)\
**Post date:** [May 18, 2018, 4:18pm UTC](https://discuss.elastic.co/t/vertical-coalescing/132516/1 "2018-05-18T16:18:54Z")

</div>

Hi,  
I have two documents (?) with 3 index:

```
@timestamp request_id exit process_id
May 18th 2018, 17:17:36.074 965ff327-5aae-11e8-a5e5-196607b31323 - 96608fdb-5aae-11e8-98d0-4d98e324480e
May 18th 2018, 17:17:35.324 965ff327-5aae-11e8-a5e5-196607b31323 400 - 

```

As you can see request\_id is the same for both documents, but in one case exist `exit`  
but not `process_id` and vice-versa. What I would is having a saved search result in Kibana that will return something like that:

```
@timestamp request_id exit process_id
May 18th 2018, 17:17:36.074 965ff327-5aae-11e8-a5e5-196607b31323 400 96608fdb-5aae-11e8-98d0-4d98e324480e

```

I have aggregate the result based on request\_id:

```
GET cwl-2018.05.18/_search
{
  "size":"0",
  "aggs" : {
    "aggregate_req_id" : {
      "terms" : { "field" : "request_id.keyword" }
    }
  }
}

```

Now I have a response with result of aggregation, sayng that for each bucket there are two documents. I would _vertically coalesce_ that aggregation, so each bucket has a single document. I'm searching for resource but i can't find no more

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 20, 2018, 8:59am UTC](https://discuss.elastic.co/t/vertical-coalescing/132516/2 "2018-05-20T08:59:54Z")

</div>

There's currently no way to do that sorry to say.

---

<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:** [June 17, 2018, 8:59am UTC](https://discuss.elastic.co/t/vertical-coalescing/132516/3 "2018-06-17T08:59:56Z")

</div>

Closed on June 17, 2018, 8:59am UTC

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