# Intercepting Elasticsearch response

**URL:** <https://discuss.elastic.co/t/intercepting-elasticsearch-response/220846>\
**Category:** Elasticsearch\
**Created:** [February 25, 2020, 12:10pm UTC](https://discuss.elastic.co/t/intercepting-elasticsearch-response/220846 "2020-02-25T12:10:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MKU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mku/32/48327_2.png) [@MKU](https://discuss.elastic.co/u/MKU)\
**Post date:** [February 25, 2020, 12:10pm UTC](https://discuss.elastic.co/t/intercepting-elasticsearch-response/220846/1 "2020-02-25T12:10:37Z")

</div>

Hi all,

I have written a sample Elasticsearch plugin basically to manipulate the search response.  
Like extending _BaseRestHandler_, and registering handler, _controller.registerHandler(GET, "/\_mysearch", this);_.  
and by implementing _ActionListener_, we can play around with response.

That works alright, but is there a way to intercept search response without having to register a new endpoint, with plugin.

Regards,  
Mohan

---

<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:** [March 24, 2020, 12:10pm UTC](https://discuss.elastic.co/t/intercepting-elasticsearch-response/220846/2 "2020-03-24T12:10:45Z")

</div>

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