# How to encode the aggregation response and get doc by id response values in Elasticsearch 7.17.x

**URL:** <https://discuss.elastic.co/t/how-to-encode-the-aggregation-response-and-get-doc-by-id-response-values-in-elasticsearch-7-17-x/335220>\
**Category:** Elasticsearch\
**Created:** [June 5, 2023, 1:05pm UTC](https://discuss.elastic.co/t/how-to-encode-the-aggregation-response-and-get-doc-by-id-response-values-in-elasticsearch-7-17-x/335220 "2023-06-05T13:05:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karunakaran-ti](https://avatars.discourse-cdn.com/v4/letter/k/bbe5ce/32.png) [@Karunakaran-ti](https://discuss.elastic.co/u/Karunakaran-ti)\
**Post date:** [June 5, 2023, 1:05pm UTC](https://discuss.elastic.co/t/how-to-encode-the-aggregation-response-and-get-doc-by-id-response-values-in-elasticsearch-7-17-x/335220/1 "2023-06-05T13:05:27Z")

</div>

I am writing a custom Elasticsearch plugin. I want to do encode the response values from aggregation response and get doc by id.

Using Elasticsearch v7.17.x

I want to know what are interface/classes to be used from Elasticsearch. Any sample code would be much more helpful

---

<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 3, 2023, 1:06pm UTC](https://discuss.elastic.co/t/how-to-encode-the-aggregation-response-and-get-doc-by-id-response-values-in-elasticsearch-7-17-x/335220/2 "2023-07-03T13:06:19Z")

</div>

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