# A plugin to change the result set before sending it back to the http client

**URL:** <https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934>\
**Category:** Elasticsearch\
**Created:** [June 5, 2014, 5:45pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934 "2014-06-05T17:45:32Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mario\_Mueller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_mueller/32/1466_2.png) [@Mario\_Mueller](https://discuss.elastic.co/u/Mario_Mueller)\
**Post date:** [June 5, 2014, 5:45pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/1 "2014-06-05T17:45:32Z")

</div>

Hey folks,

I kindly ask for a hint to achieve the following thing:

The goal is to deliver only a json array of source objects to the client.  
The php app that sits on the other side uses JMS\Serializer to deserialize  
the response into entities. At the moment the app needs to take an overhead  
to derserialize it, extract the source and serialize it again. Then the  
serialized stuff is passed to the entity deserializer. That's really  
painful.

I've found a thread that suggests a proxy in between to handle this type of  
problem, but this is not possible in our env.

The real question is: Is this achievable by writing a plugin? And if so,  
what type of plugin? I've looked at the RestFilter, but I don't know if  
this is the right way to go...

Any hints are welcome!

Regards,  
Mario

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 5, 2014, 5:54pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/2 "2014-06-05T17:54:59Z")

</div>

If you are only modifying the REST API calls and not the Java API, such a  
plugin should be easy. You are not creating a new type of action, merely  
using the current search one, but changing the output format.

Here are two tutorials on simple REST plugins:  
[http://jprante.github.io/lessons/2012/03/27/Writing-a-simple-plugin-for-Elasticsearch.html](http://jprante.github.io/lessons/2012/03/27/Writing-a-simple-plugin-for-Elasticsearch.html)

> **[Create pluggable REST endpoints in elasticsearch](http://blog.brusic.com/2011/09/create-pluggable-rest-endpoints-in.html)**
>
> A quick introduction on how to create a plugin in elasticsearch that allows you to define new REST endpoints.

Hopefully the content is not too old. Base the plugin around the  
existing RestSearchAction, but in the handleRequest method, instead of  
returning the results directly, you can modify them before.

Cheers

Ivan

On Thu, Jun 5, 2014 at 10:45 AM, Mario Mueller [mario@xenji.com](mailto:mario@xenji.com) wrote:

> Hey folks,
> 
> I kindly ask for a hint to achieve the following thing:
> 
> The goal is to deliver only a json array of source objects to the client.  
> The php app that sits on the other side uses JMS\Serializer to deserialize  
> the response into entities. At the moment the app needs to take an overhead  
> to derserialize it, extract the source and serialize it again. Then the  
> serialized stuff is passed to the entity deserializer. That's really  
> painful.
> 
> I've found a thread that suggests a proxy in between to handle this type  
> of problem, but this is not possible in our env.
> 
> The real question is: Is this achievable by writing a plugin? And if so,  
> what type of plugin? I've looked at the RestFilter, but I don't know if  
> this is the right way to go...
> 
> Any hints are welcome!
> 
> Regards,  
> Mario
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQDcoz8ap%3DYK-DHogkksbjecLnQGcaejOccgneWdutf4PQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQDcoz8ap%3DYK-DHogkksbjecLnQGcaejOccgneWdutf4PQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mario\_Mueller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_mueller/32/1466_2.png) [@Mario\_Mueller](https://discuss.elastic.co/u/Mario_Mueller)\
**Post date:** [June 5, 2014, 5:59pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/3 "2014-06-05T17:59:03Z")

</div>

So, if I understood your approach in the right way ... I should build a new  
Rest Action like "\_search\_and\_return\_source" that proxies the original  
\_search one?

I've already read those two articles and I've set up my development  
environment with the help of those 😉

Am Donnerstag, 5. Juni 2014 19:55:06 UTC+2 schrieb Ivan Brusic:

> If you are only modifying the REST API calls and not the Java API, such a  
> plugin should be easy. You are not creating a new type of action, merely  
> using the current search one, but changing the output format.
> 
> Here are two tutorials on simple REST plugins:
> 
> [http://jprante.github.io/lessons/2012/03/27/Writing-a-simple-plugin-for-Elasticsearch.html](http://jprante.github.io/lessons/2012/03/27/Writing-a-simple-plugin-for-Elasticsearch.html)  
> [{ "blog" : "brusic" }: Create pluggable REST endpoints in elasticsearch](http://blog.brusic.com/2011/09/create-pluggable-rest-endpoints-in.html)
> 
> Hopefully the content is not too old. Base the plugin around the  
> existing RestSearchAction, but in the handleRequest method, instead of  
> returning the results directly, you can modify them before.
> 
> Cheers
> 
> Ivan
> 
> On Thu, Jun 5, 2014 at 10:45 AM, Mario Mueller \<[ma...@xenji.com](mailto:ma...@xenji.com)  
> \<javascript:\>\> wrote:
> 
> > Hey folks,
> > 
> > I kindly ask for a hint to achieve the following thing:
> > 
> > The goal is to deliver only a json array of source objects to the client.  
> > The php app that sits on the other side uses JMS\Serializer to deserialize  
> > the response into entities. At the moment the app needs to take an overhead  
> > to derserialize it, extract the source and serialize it again. Then the  
> > serialized stuff is passed to the entity deserializer. That's really  
> > painful.
> > 
> > I've found a thread that suggests a proxy in between to handle this type  
> > of problem, but this is not possible in our env.
> > 
> > The real question is: Is this achievable by writing a plugin? And if so,  
> > what type of plugin? I've looked at the RestFilter, but I don't know if  
> > this is the right way to go...
> > 
> > Any hints are welcome!
> > 
> > Regards,  
> > Mario
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8158ba2e-55e1-4c1b-b918-ee33000800a0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8158ba2e-55e1-4c1b-b918-ee33000800a0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [June 5, 2014, 7:36pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/4 "2014-06-05T19:36:23Z")

</div>

Just a quick question, do you just want to extract a field from the json  
source?

There are field filters and parameters for shaping such a JSON result,  
maybe they can already help?

Or can you give an example of the problem?

Jörg

On Thu, Jun 5, 2014 at 7:45 PM, Mario Mueller [mario@xenji.com](mailto:mario@xenji.com) wrote:

> Hey folks,
> 
> I kindly ask for a hint to achieve the following thing:
> 
> The goal is to deliver only a json array of source objects to the client.  
> The php app that sits on the other side uses JMS\Serializer to deserialize  
> the response into entities. At the moment the app needs to take an overhead  
> to derserialize it, extract the source and serialize it again. Then the  
> serialized stuff is passed to the entity deserializer. That's really  
> painful.
> 
> I've found a thread that suggests a proxy in between to handle this type  
> of problem, but this is not possible in our env.
> 
> The real question is: Is this achievable by writing a plugin? And if so,  
> what type of plugin? I've looked at the RestFilter, but I don't know if  
> this is the right way to go...
> 
> Any hints are welcome!
> 
> Regards,  
> Mario
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHxptD%2BrE2YRSMerwtuxgGGReCNgP9wtJ2ppFWojbYMKw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHxptD%2BrE2YRSMerwtuxgGGReCNgP9wtJ2ppFWojbYMKw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mario\_Mueller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_mueller/32/1466_2.png) [@Mario\_Mueller](https://discuss.elastic.co/u/Mario_Mueller)\
**Post date:** [June 5, 2014, 7:40pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/5 "2014-06-05T19:40:50Z")

</div>

Hey Joerg,

I just need the whole content of the \_source field like so:

[  
{  
"HotelName": "Plaka",  
"ProductCode": "7050",  
"objectId": "437-de",  
"GroupId": 25223,  
"readonly": false,  
"lang": "de",  
"City": "Athens"  
},  
{  
"HotelName": "Hyatt at Fisherman's Wharf",  
"ProductCode": "52397",  
"objectId": "14479-de",  
"GroupId": 25223,  
"readonly": false,  
"lang": "de",  
"City": "San Francisco"  
}  
]

Those fields are not stored, but indexed. As I mentioned before, this  
source matches exactly to an entity structure in our application and we  
need the structure of the source document 1:1. If this is achievable by any  
other methods than a plugin, then I am totally fine with it.

Am Donnerstag, 5. Juni 2014 21:36:31 UTC+2 schrieb Jörg Prante:

> Just a quick question, do you just want to extract a field from the json  
> source?
> 
> There are field filters and parameters for shaping such a JSON result,  
> maybe they can already help?
> 
> Or can you give an example of the problem?
> 
> Jörg
> 
> On Thu, Jun 5, 2014 at 7:45 PM, Mario Mueller \<[ma...@xenji.com](mailto:ma...@xenji.com)  
> \<javascript:\>\> wrote:
> 
> > Hey folks,
> > 
> > I kindly ask for a hint to achieve the following thing:
> > 
> > The goal is to deliver only a json array of source objects to the client.  
> > The php app that sits on the other side uses JMS\Serializer to deserialize  
> > the response into entities. At the moment the app needs to take an overhead  
> > to derserialize it, extract the source and serialize it again. Then the  
> > serialized stuff is passed to the entity deserializer. That's really  
> > painful.
> > 
> > I've found a thread that suggests a proxy in between to handle this type  
> > of problem, but this is not possible in our env.
> > 
> > The real question is: Is this achievable by writing a plugin? And if so,  
> > what type of plugin? I've looked at the RestFilter, but I don't know if  
> > this is the right way to go...
> > 
> > Any hints are welcome!
> > 
> > Regards,  
> > Mario
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 5, 2014, 7:49pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/6 "2014-06-05T19:49:03Z")

</div>

There is no way to eliminate returning the search metadata. It has been  
requested often.

--  
Ivan

On Thu, Jun 5, 2014 at 12:40 PM, Mario Mueller [mario@xenji.com](mailto:mario@xenji.com) wrote:

> Hey Joerg,
> 
> I just need the whole content of the \_source field like so:
> 
> [  
> {  
> "HotelName": "Plaka",  
> "ProductCode": "7050",  
> "objectId": "437-de",  
> "GroupId": 25223,  
> "readonly": false,  
> "lang": "de",  
> "City": "Athens"  
> },  
> {  
> "HotelName": "Hyatt at Fisherman's Wharf",  
> "ProductCode": "52397",  
> "objectId": "14479-de",  
> "GroupId": 25223,  
> "readonly": false,  
> "lang": "de",  
> "City": "San Francisco"  
> }  
> ]
> 
> Those fields are not stored, but indexed. As I mentioned before, this  
> source matches exactly to an entity structure in our application and we  
> need the structure of the source document 1:1. If this is achievable by any  
> other methods than a plugin, then I am totally fine with it.
> 
> Am Donnerstag, 5. Juni 2014 21:36:31 UTC+2 schrieb Jörg Prante:
> 
> > Just a quick question, do you just want to extract a field from the json  
> > source?
> > 
> > There are field filters and parameters for shaping such a JSON result,  
> > maybe they can already help?
> > 
> > Or can you give an example of the problem?
> > 
> > Jörg
> > 
> > On Thu, Jun 5, 2014 at 7:45 PM, Mario Mueller [ma...@xenji.com](mailto:ma...@xenji.com) wrote:
> > 
> > > Hey folks,
> > > 
> > > I kindly ask for a hint to achieve the following thing:
> > > 
> > > The goal is to deliver only a json array of source objects to the  
> > > client. The php app that sits on the other side uses JMS\Serializer to  
> > > deserialize the response into entities. At the moment the app needs to take  
> > > an overhead to derserialize it, extract the source and serialize it again.  
> > > Then the serialized stuff is passed to the entity deserializer. That's  
> > > really painful.
> > > 
> > > I've found a thread that suggests a proxy in between to handle this type  
> > > of problem, but this is not possible in our env.
> > > 
> > > The real question is: Is this achievable by writing a plugin? And if so,  
> > > what type of plugin? I've looked at the RestFilter, but I don't know if  
> > > this is the right way to go...
> > > 
> > > Any hints are welcome!
> > > 
> > > Regards,  
> > > Mario
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > 
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%  
> > > [40googlegroups.com](http://40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92\_XOSTvDgqBPiJ5ng%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92_XOSTvDgqBPiJ5ng%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [June 5, 2014, 8:08pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/7 "2014-06-05T20:08:24Z")

</div>

Ah, now I get it. Source without metadata, listed in the order of hits.

This should be easy to do in a plugin. REST filter is the way to go for  
PHP. Just a minute...

Jörg

On Thu, Jun 5, 2014 at 9:49 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> There is no way to eliminate returning the search metadata. It has been  
> requested often.
> 
> --  
> Ivan
> 
> On Thu, Jun 5, 2014 at 12:40 PM, Mario Mueller [mario@xenji.com](mailto:mario@xenji.com) wrote:
> 
> > Hey Joerg,
> > 
> > I just need the whole content of the \_source field like so:
> > 
> > [  
> > {  
> > "HotelName": "Plaka",  
> > "ProductCode": "7050",  
> > "objectId": "437-de",  
> > "GroupId": 25223,  
> > "readonly": false,  
> > "lang": "de",  
> > "City": "Athens"  
> > },  
> > {  
> > "HotelName": "Hyatt at Fisherman's Wharf",  
> > "ProductCode": "52397",  
> > "objectId": "14479-de",  
> > "GroupId": 25223,  
> > "readonly": false,  
> > "lang": "de",  
> > "City": "San Francisco"  
> > }  
> > ]
> > 
> > Those fields are not stored, but indexed. As I mentioned before, this  
> > source matches exactly to an entity structure in our application and we  
> > need the structure of the source document 1:1. If this is achievable by any  
> > other methods than a plugin, then I am totally fine with it.
> > 
> > Am Donnerstag, 5. Juni 2014 21:36:31 UTC+2 schrieb Jörg Prante:
> > 
> > > Just a quick question, do you just want to extract a field from the json  
> > > source?
> > > 
> > > There are field filters and parameters for shaping such a JSON result,  
> > > maybe they can already help?
> > > 
> > > Or can you give an example of the problem?
> > > 
> > > Jörg
> > > 
> > > On Thu, Jun 5, 2014 at 7:45 PM, Mario Mueller [ma...@xenji.com](mailto:ma...@xenji.com) wrote:
> > > 
> > > > Hey folks,
> > > > 
> > > > I kindly ask for a hint to achieve the following thing:
> > > > 
> > > > The goal is to deliver only a json array of source objects to the  
> > > > client. The php app that sits on the other side uses JMS\Serializer to  
> > > > deserialize the response into entities. At the moment the app needs to take  
> > > > an overhead to derserialize it, extract the source and serialize it again.  
> > > > Then the serialized stuff is passed to the entity deserializer. That's  
> > > > really painful.
> > > > 
> > > > I've found a thread that suggests a proxy in between to handle this  
> > > > type of problem, but this is not possible in our env.
> > > > 
> > > > The real question is: Is this achievable by writing a plugin? And if  
> > > > so, what type of plugin? I've looked at the RestFilter, but I don't know if  
> > > > this is the right way to go...
> > > > 
> > > > Any hints are welcome!
> > > > 
> > > > Regards,  
> > > > Mario
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > > 
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%  
> > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92\_XOSTvDgqBPiJ5ng%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92_XOSTvDgqBPiJ5ng%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92\_XOSTvDgqBPiJ5ng%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92_XOSTvDgqBPiJ5ng%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 5, 2014, 8:28pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/8 "2014-06-05T20:28:01Z")

</div>

I just looked it up and it should be as easy as creating your  
own RestResponseListener that takes a SearchResponse and creates a  
simplified version with no metadata.

Should be an interesting quick plugin, but it looks like Jorg is going to  
beat me to it (I'm still at work for several more hours).

--  
Ivan

On Thu, Jun 5, 2014 at 1:08 PM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<[joergprante@gmail.com](mailto:joergprante@gmail.com)

> wrote:

> Ah, now I get it. Source without metadata, listed in the order of hits.
> 
> This should be easy to do in a plugin. REST filter is the way to go for  
> PHP. Just a minute...
> 
> Jörg
> 
> On Thu, Jun 5, 2014 at 9:49 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> 
> > There is no way to eliminate returning the search metadata. It has been  
> > requested often.
> > 
> > --  
> > Ivan
> > 
> > On Thu, Jun 5, 2014 at 12:40 PM, Mario Mueller [mario@xenji.com](mailto:mario@xenji.com) wrote:
> > 
> > > Hey Joerg,
> > > 
> > > I just need the whole content of the \_source field like so:
> > > 
> > > [  
> > > {  
> > > "HotelName": "Plaka",  
> > > "ProductCode": "7050",  
> > > "objectId": "437-de",  
> > > "GroupId": 25223,  
> > > "readonly": false,  
> > > "lang": "de",  
> > > "City": "Athens"  
> > > },  
> > > {  
> > > "HotelName": "Hyatt at Fisherman's Wharf",  
> > > "ProductCode": "52397",  
> > > "objectId": "14479-de",  
> > > "GroupId": 25223,  
> > > "readonly": false,  
> > > "lang": "de",  
> > > "City": "San Francisco"  
> > > }  
> > > ]
> > > 
> > > Those fields are not stored, but indexed. As I mentioned before, this  
> > > source matches exactly to an entity structure in our application and we  
> > > need the structure of the source document 1:1. If this is achievable by any  
> > > other methods than a plugin, then I am totally fine with it.
> > > 
> > > Am Donnerstag, 5. Juni 2014 21:36:31 UTC+2 schrieb Jörg Prante:
> > > 
> > > > Just a quick question, do you just want to extract a field from the  
> > > > json source?
> > > > 
> > > > There are field filters and parameters for shaping such a JSON result,  
> > > > maybe they can already help?
> > > > 
> > > > Or can you give an example of the problem?
> > > > 
> > > > Jörg
> > > > 
> > > > On Thu, Jun 5, 2014 at 7:45 PM, Mario Mueller [ma...@xenji.com](mailto:ma...@xenji.com) wrote:
> > > > 
> > > > > Hey folks,
> > > > > 
> > > > > I kindly ask for a hint to achieve the following thing:
> > > > > 
> > > > > The goal is to deliver only a json array of source objects to the  
> > > > > client. The php app that sits on the other side uses JMS\Serializer to  
> > > > > deserialize the response into entities. At the moment the app needs to take  
> > > > > an overhead to derserialize it, extract the source and serialize it again.  
> > > > > Then the serialized stuff is passed to the entity deserializer. That's  
> > > > > really painful.
> > > > > 
> > > > > I've found a thread that suggests a proxy in between to handle this  
> > > > > type of problem, but this is not possible in our env.
> > > > > 
> > > > > The real question is: Is this achievable by writing a plugin? And if  
> > > > > so, what type of plugin? I've looked at the RestFilter, but I don't know if  
> > > > > this is the right way to go...
> > > > > 
> > > > > Any hints are welcome!
> > > > > 
> > > > > Regards,  
> > > > > Mario
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to the Google  
> > > > > Groups "elasticsearch" group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > > > 
> > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%  
> > > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > .  
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92\_XOSTvDgqBPiJ5ng%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92_XOSTvDgqBPiJ5ng%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92\_XOSTvDgqBPiJ5ng%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92_XOSTvDgqBPiJ5ng%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [June 5, 2014, 9:37pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/9 "2014-06-05T21:37:13Z")

</div>

OK, I think I made it. Good exercise to wrestle with Github before going to  
sleep...

[https://github.com/jprante/elasticsearch-arrayformat](https://github.com/jprante/elasticsearch-arrayformat)

Best,

Jörg

On Thu, Jun 5, 2014 at 10:28 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> I just looked it up and it should be as easy as creating your  
> own RestResponseListener that takes a SearchResponse and creates a  
> simplified version with no metadata.
> 
> Should be an interesting quick plugin, but it looks like Jorg is going to  
> beat me to it (I'm still at work for several more hours).
> 
> --  
> Ivan
> 
> On Thu, Jun 5, 2014 at 1:08 PM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<  
> [joergprante@gmail.com](mailto:joergprante@gmail.com)\> wrote:
> 
> > Ah, now I get it. Source without metadata, listed in the order of hits.
> > 
> > This should be easy to do in a plugin. REST filter is the way to go for  
> > PHP. Just a minute...
> > 
> > Jörg
> > 
> > On Thu, Jun 5, 2014 at 9:49 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> > 
> > > There is no way to eliminate returning the search metadata. It has been  
> > > requested often.
> > > 
> > > --  
> > > Ivan
> > > 
> > > On Thu, Jun 5, 2014 at 12:40 PM, Mario Mueller [mario@xenji.com](mailto:mario@xenji.com) wrote:
> > > 
> > > > Hey Joerg,
> > > > 
> > > > I just need the whole content of the \_source field like so:
> > > > 
> > > > [  
> > > > {  
> > > > "HotelName": "Plaka",  
> > > > "ProductCode": "7050",  
> > > > "objectId": "437-de",  
> > > > "GroupId": 25223,  
> > > > "readonly": false,  
> > > > "lang": "de",  
> > > > "City": "Athens"  
> > > > },  
> > > > {  
> > > > "HotelName": "Hyatt at Fisherman's Wharf",  
> > > > "ProductCode": "52397",  
> > > > "objectId": "14479-de",  
> > > > "GroupId": 25223,  
> > > > "readonly": false,  
> > > > "lang": "de",  
> > > > "City": "San Francisco"  
> > > > }  
> > > > ]
> > > > 
> > > > Those fields are not stored, but indexed. As I mentioned before, this  
> > > > source matches exactly to an entity structure in our application and we  
> > > > need the structure of the source document 1:1. If this is achievable by any  
> > > > other methods than a plugin, then I am totally fine with it.
> > > > 
> > > > Am Donnerstag, 5. Juni 2014 21:36:31 UTC+2 schrieb Jörg Prante:
> > > > 
> > > > > Just a quick question, do you just want to extract a field from the  
> > > > > json source?
> > > > > 
> > > > > There are field filters and parameters for shaping such a JSON result,  
> > > > > maybe they can already help?
> > > > > 
> > > > > Or can you give an example of the problem?
> > > > > 
> > > > > Jörg
> > > > > 
> > > > > On Thu, Jun 5, 2014 at 7:45 PM, Mario Mueller [ma...@xenji.com](mailto:ma...@xenji.com) wrote:
> > > > > 
> > > > > > Hey folks,
> > > > > > 
> > > > > > I kindly ask for a hint to achieve the following thing:
> > > > > > 
> > > > > > The goal is to deliver only a json array of source objects to the  
> > > > > > client. The php app that sits on the other side uses JMS\Serializer to  
> > > > > > deserialize the response into entities. At the moment the app needs to take  
> > > > > > an overhead to derserialize it, extract the source and serialize it again.  
> > > > > > Then the serialized stuff is passed to the entity deserializer. That's  
> > > > > > really painful.
> > > > > > 
> > > > > > I've found a thread that suggests a proxy in between to handle this  
> > > > > > type of problem, but this is not possible in our env.
> > > > > > 
> > > > > > The real question is: Is this achievable by writing a plugin? And if  
> > > > > > so, what type of plugin? I've looked at the RestFilter, but I don't know if  
> > > > > > this is the right way to go...
> > > > > > 
> > > > > > Any hints are welcome!
> > > > > > 
> > > > > > Regards,  
> > > > > > Mario
> > > > > > 
> > > > > > --  
> > > > > > You received this message because you are subscribed to the Google  
> > > > > > Groups "elasticsearch" group.  
> > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > > > > 
> > > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%  
> > > > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > > > [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > > .  
> > > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to the Google  
> > > > > Groups "elasticsearch" group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > > > To view this discussion on the web visit  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com)  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > .
> > > > 
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92\_XOSTvDgqBPiJ5ng%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92_XOSTvDgqBPiJ5ng%40mail.gmail.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92\_XOSTvDgqBPiJ5ng%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92_XOSTvDgqBPiJ5ng%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > .
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUOa4uFzfQYB%2BMpDdeEP3FdYc0fRA4OW7mkXLdzvkOJg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUOa4uFzfQYB%2BMpDdeEP3FdYc0fRA4OW7mkXLdzvkOJg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 5, 2014, 10:03pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/10 "2014-06-05T22:03:38Z")

</div>

I see that we agree that a new RestResponseListener is the way to go.

I have not cloned your project yet, only looked at the code on github, but  
I noticed that you provided your own parseSearchRequest, but still  
call RestSearchAction.parseSearchRequest from inside handleRequest. Did I  
misinterpret the code or is that a mistake?

--  
Ivan

On Thu, Jun 5, 2014 at 2:37 PM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<[joergprante@gmail.com](mailto:joergprante@gmail.com)

> wrote:

> OK, I think I made it. Good exercise to wrestle with Github before going  
> to sleep...
> 
> [https://github.com/jprante/elasticsearch-arrayformat](https://github.com/jprante/elasticsearch-arrayformat)
> 
> Best,
> 
> Jörg
> 
> On Thu, Jun 5, 2014 at 10:28 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> 
> > I just looked it up and it should be as easy as creating your  
> > own RestResponseListener that takes a SearchResponse and creates a  
> > simplified version with no metadata.
> > 
> > Should be an interesting quick plugin, but it looks like Jorg is going to  
> > beat me to it (I'm still at work for several more hours).
> > 
> > --  
> > Ivan
> > 
> > On Thu, Jun 5, 2014 at 1:08 PM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<  
> > [joergprante@gmail.com](mailto:joergprante@gmail.com)\> wrote:
> > 
> > > Ah, now I get it. Source without metadata, listed in the order of hits.
> > > 
> > > This should be easy to do in a plugin. REST filter is the way to go for  
> > > PHP. Just a minute...
> > > 
> > > Jörg
> > > 
> > > On Thu, Jun 5, 2014 at 9:49 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> > > 
> > > > There is no way to eliminate returning the search metadata. It has been  
> > > > requested often.
> > > > 
> > > > --  
> > > > Ivan
> > > > 
> > > > On Thu, Jun 5, 2014 at 12:40 PM, Mario Mueller [mario@xenji.com](mailto:mario@xenji.com) wrote:
> > > > 
> > > > > Hey Joerg,
> > > > > 
> > > > > I just need the whole content of the \_source field like so:
> > > > > 
> > > > > [  
> > > > > {  
> > > > > "HotelName": "Plaka",  
> > > > > "ProductCode": "7050",  
> > > > > "objectId": "437-de",  
> > > > > "GroupId": 25223,  
> > > > > "readonly": false,  
> > > > > "lang": "de",  
> > > > > "City": "Athens"  
> > > > > },  
> > > > > {  
> > > > > "HotelName": "Hyatt at Fisherman's Wharf",  
> > > > > "ProductCode": "52397",  
> > > > > "objectId": "14479-de",  
> > > > > "GroupId": 25223,  
> > > > > "readonly": false,  
> > > > > "lang": "de",  
> > > > > "City": "San Francisco"  
> > > > > }  
> > > > > ]
> > > > > 
> > > > > Those fields are not stored, but indexed. As I mentioned before, this  
> > > > > source matches exactly to an entity structure in our application and we  
> > > > > need the structure of the source document 1:1. If this is achievable by any  
> > > > > other methods than a plugin, then I am totally fine with it.
> > > > > 
> > > > > Am Donnerstag, 5. Juni 2014 21:36:31 UTC+2 schrieb Jörg Prante:
> > > > > 
> > > > > > Just a quick question, do you just want to extract a field from the  
> > > > > > json source?
> > > > > > 
> > > > > > There are field filters and parameters for shaping such a JSON  
> > > > > > result, maybe they can already help?
> > > > > > 
> > > > > > Or can you give an example of the problem?
> > > > > > 
> > > > > > Jörg
> > > > > > 
> > > > > > On Thu, Jun 5, 2014 at 7:45 PM, Mario Mueller [ma...@xenji.com](mailto:ma...@xenji.com)  
> > > > > > wrote:
> > > > > > 
> > > > > > > Hey folks,
> > > > > > > 
> > > > > > > I kindly ask for a hint to achieve the following thing:
> > > > > > > 
> > > > > > > The goal is to deliver only a json array of source objects to the  
> > > > > > > client. The php app that sits on the other side uses JMS\Serializer to  
> > > > > > > deserialize the response into entities. At the moment the app needs to take  
> > > > > > > an overhead to derserialize it, extract the source and serialize it again.  
> > > > > > > Then the serialized stuff is passed to the entity deserializer. That's  
> > > > > > > really painful.
> > > > > > > 
> > > > > > > I've found a thread that suggests a proxy in between to handle this  
> > > > > > > type of problem, but this is not possible in our env.
> > > > > > > 
> > > > > > > The real question is: Is this achievable by writing a plugin? And if  
> > > > > > > so, what type of plugin? I've looked at the RestFilter, but I don't know if  
> > > > > > > this is the right way to go...
> > > > > > > 
> > > > > > > Any hints are welcome!
> > > > > > > 
> > > > > > > Regards,  
> > > > > > > Mario
> > > > > > > 
> > > > > > > --  
> > > > > > > You received this message because you are subscribed to the Google  
> > > > > > > Groups "elasticsearch" group.  
> > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > > > > > 
> > > > > > > To view this discussion on the web visit  
> > > > > > > [https://groups.google.com/d/msgid/elasticsearch/6844c290-](https://groups.google.com/d/msgid/elasticsearch/6844c290-)  
> > > > > > > e7f8-46d7-b5b3-27cab18fb706%[40googlegroups.com](http://40googlegroups.com)  
> > > > > > > [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > > > .  
> > > > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > > 
> > > > > > --  
> > > > > > You received this message because you are subscribed to the Google  
> > > > > > Groups "elasticsearch" group.  
> > > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > > > > To view this discussion on the web visit  
> > > > > > [https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com)  
> > > > > > [https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > > .
> > > > > 
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92\_XOSTvDgqBPiJ5ng%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92_XOSTvDgqBPiJ5ng%40mail.gmail.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92\_XOSTvDgqBPiJ5ng%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92_XOSTvDgqBPiJ5ng%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > > .
> > > > 
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > .
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUOa4uFzfQYB%2BMpDdeEP3FdYc0fRA4OW7mkXLdzvkOJg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUOa4uFzfQYB%2BMpDdeEP3FdYc0fRA4OW7mkXLdzvkOJg%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUOa4uFzfQYB%2BMpDdeEP3FdYc0fRA4OW7mkXLdzvkOJg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUOa4uFzfQYB%2BMpDdeEP3FdYc0fRA4OW7mkXLdzvkOJg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC3osMZXmiOODFXk9cZP2XvE01F0WnBag%2B%3DHQNxzN6W%2Bw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC3osMZXmiOODFXk9cZP2XvE01F0WnBag%2B%3DHQNxzN6W%2Bw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [June 5, 2014, 10:50pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/11 "2014-06-05T22:50:12Z")

</div>

Ups, yes, a mistake... I bluntly copy/pasted the RestSearchAction. Thanks!

Jörg

On Fri, Jun 6, 2014 at 12:03 AM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> I see that we agree that a new RestResponseListener is the way to go.
> 
> I have not cloned your project yet, only looked at the code on github, but  
> I noticed that you provided your own parseSearchRequest, but still  
> call RestSearchAction.parseSearchRequest from inside handleRequest. Did I  
> misinterpret the code or is that a mistake?
> 
> --  
> Ivan
> 
> On Thu, Jun 5, 2014 at 2:37 PM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<  
> [joergprante@gmail.com](mailto:joergprante@gmail.com)\> wrote:
> 
> > OK, I think I made it. Good exercise to wrestle with Github before going  
> > to sleep...
> > 
> > [https://github.com/jprante/elasticsearch-arrayformat](https://github.com/jprante/elasticsearch-arrayformat)
> > 
> > Best,
> > 
> > Jörg
> > 
> > On Thu, Jun 5, 2014 at 10:28 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> > 
> > > I just looked it up and it should be as easy as creating your  
> > > own RestResponseListener that takes a SearchResponse and creates a  
> > > simplified version with no metadata.
> > > 
> > > Should be an interesting quick plugin, but it looks like Jorg is going  
> > > to beat me to it (I'm still at work for several more hours).
> > > 
> > > --  
> > > Ivan
> > > 
> > > On Thu, Jun 5, 2014 at 1:08 PM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<  
> > > [joergprante@gmail.com](mailto:joergprante@gmail.com)\> wrote:
> > > 
> > > > Ah, now I get it. Source without metadata, listed in the order of hits.
> > > > 
> > > > This should be easy to do in a plugin. REST filter is the way to go for  
> > > > PHP. Just a minute...
> > > > 
> > > > Jörg
> > > > 
> > > > On Thu, Jun 5, 2014 at 9:49 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> > > > 
> > > > > There is no way to eliminate returning the search metadata. It has  
> > > > > been requested often.
> > > > > 
> > > > > --  
> > > > > Ivan
> > > > > 
> > > > > On Thu, Jun 5, 2014 at 12:40 PM, Mario Mueller [mario@xenji.com](mailto:mario@xenji.com)  
> > > > > wrote:
> > > > > 
> > > > > > Hey Joerg,
> > > > > > 
> > > > > > I just need the whole content of the \_source field like so:
> > > > > > 
> > > > > > [  
> > > > > > {  
> > > > > > "HotelName": "Plaka",  
> > > > > > "ProductCode": "7050",  
> > > > > > "objectId": "437-de",  
> > > > > > "GroupId": 25223,  
> > > > > > "readonly": false,  
> > > > > > "lang": "de",  
> > > > > > "City": "Athens"  
> > > > > > },  
> > > > > > {  
> > > > > > "HotelName": "Hyatt at Fisherman's Wharf",  
> > > > > > "ProductCode": "52397",  
> > > > > > "objectId": "14479-de",  
> > > > > > "GroupId": 25223,  
> > > > > > "readonly": false,  
> > > > > > "lang": "de",  
> > > > > > "City": "San Francisco"  
> > > > > > }  
> > > > > > ]
> > > > > > 
> > > > > > Those fields are not stored, but indexed. As I mentioned before, this  
> > > > > > source matches exactly to an entity structure in our application and we  
> > > > > > need the structure of the source document 1:1. If this is achievable by any  
> > > > > > other methods than a plugin, then I am totally fine with it.
> > > > > > 
> > > > > > Am Donnerstag, 5. Juni 2014 21:36:31 UTC+2 schrieb Jörg Prante:
> > > > > > 
> > > > > > > Just a quick question, do you just want to extract a field from the  
> > > > > > > json source?
> > > > > > > 
> > > > > > > There are field filters and parameters for shaping such a JSON  
> > > > > > > result, maybe they can already help?
> > > > > > > 
> > > > > > > Or can you give an example of the problem?
> > > > > > > 
> > > > > > > Jörg
> > > > > > > 
> > > > > > > On Thu, Jun 5, 2014 at 7:45 PM, Mario Mueller [ma...@xenji.com](mailto:ma...@xenji.com)  
> > > > > > > wrote:
> > > > > > > 
> > > > > > > > Hey folks,
> > > > > > > > 
> > > > > > > > I kindly ask for a hint to achieve the following thing:
> > > > > > > > 
> > > > > > > > The goal is to deliver only a json array of source objects to the  
> > > > > > > > client. The php app that sits on the other side uses JMS\Serializer to  
> > > > > > > > deserialize the response into entities. At the moment the app needs to take  
> > > > > > > > an overhead to derserialize it, extract the source and serialize it again.  
> > > > > > > > Then the serialized stuff is passed to the entity deserializer. That's  
> > > > > > > > really painful.
> > > > > > > > 
> > > > > > > > I've found a thread that suggests a proxy in between to handle this  
> > > > > > > > type of problem, but this is not possible in our env.
> > > > > > > > 
> > > > > > > > The real question is: Is this achievable by writing a plugin? And  
> > > > > > > > if so, what type of plugin? I've looked at the RestFilter, but I don't know  
> > > > > > > > if this is the right way to go...
> > > > > > > > 
> > > > > > > > Any hints are welcome!
> > > > > > > > 
> > > > > > > > Regards,  
> > > > > > > > Mario
> > > > > > > > 
> > > > > > > > --  
> > > > > > > > You received this message because you are subscribed to the Google  
> > > > > > > > Groups "elasticsearch" group.  
> > > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > > send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > > > > > > 
> > > > > > > > To view this discussion on the web visit  
> > > > > > > > [https://groups.google.com/d/msgid/elasticsearch/6844c290-](https://groups.google.com/d/msgid/elasticsearch/6844c290-)  
> > > > > > > > e7f8-46d7-b5b3-27cab18fb706%[40googlegroups.com](http://40googlegroups.com)  
> > > > > > > > [https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > > > > .  
> > > > > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > > > 
> > > > > > > --  
> > > > > > > You received this message because you are subscribed to the Google  
> > > > > > > Groups "elasticsearch" group.  
> > > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > > send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > > > > > To view this discussion on the web visit  
> > > > > > > [https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com)  
> > > > > > > [https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > > > .
> > > > > > 
> > > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to the Google  
> > > > > Groups "elasticsearch" group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > > > To view this discussion on the web visit  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92\_XOSTvDgqBPiJ5ng%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92_XOSTvDgqBPiJ5ng%40mail.gmail.com)  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92\_XOSTvDgqBPiJ5ng%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92_XOSTvDgqBPiJ5ng%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > > > .
> > > > > 
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > > .
> > > > 
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > .
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUOa4uFzfQYB%2BMpDdeEP3FdYc0fRA4OW7mkXLdzvkOJg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUOa4uFzfQYB%2BMpDdeEP3FdYc0fRA4OW7mkXLdzvkOJg%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUOa4uFzfQYB%2BMpDdeEP3FdYc0fRA4OW7mkXLdzvkOJg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUOa4uFzfQYB%2BMpDdeEP3FdYc0fRA4OW7mkXLdzvkOJg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC3osMZXmiOODFXk9cZP2XvE01F0WnBag%2B%3DHQNxzN6W%2Bw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC3osMZXmiOODFXk9cZP2XvE01F0WnBag%2B%3DHQNxzN6W%2Bw%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC3osMZXmiOODFXk9cZP2XvE01F0WnBag%2B%3DHQNxzN6W%2Bw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC3osMZXmiOODFXk9cZP2XvE01F0WnBag%2B%3DHQNxzN6W%2Bw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoF5qAr%3D8FTwYR687XUHRS2B2a%3DmzXhT12bypD-KB\_7OZA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoF5qAr%3D8FTwYR687XUHRS2B2a%3DmzXhT12bypD-KB_7OZA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![brian\_yoder](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@brian\_yoder](https://discuss.elastic.co/u/brian_yoder)\
**Post date:** [June 5, 2014, 11:38pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/12 "2014-06-05T23:38:51Z")

</div>

This may or may not help, but the following worked well for me. Just as any  
database-backed application, the business logic (such as what you  
described) is best implemented outside of the database. Since ES is a  
first-class Java citizen and its Java API is clean and superb  
(documentation shortcomings are more than made up for by the excellent  
advice from this newsgroup), this is what I did:

1. Create my business logic, and use the TransportClient to contact  
Elasticsearch. It's easy to test it in a stand-alone driver.

2. Create a server using Netty and the LMAX Disruptor. Netty is awesome,  
and I could craft the interface to accept the questions that made sense to  
the business, not to Elasticsearch. Then I instantiated an LMAX Disruptor  
in multi-producer mode, and each Netty thread simply created an event that  
contained 2 objects: The decoded HTTP request parameter, and the reference  
to the response output channel.

3. The Disruptor contained a fixed number of Worker handler threads (to  
match those in Elasticsearch) that actually converted the request into one  
or more Elasticsearch requests, performing whatever functions the business  
logic required, and then writing the responses back to the response channel.

Even if my server got a huge burst of requests, they were quickly queued  
which means that the Netty handler thread count stays low. And then the  
back-end Disruptor thread max will ensure that Elasticsearch is never  
overloaded.

This is kind of the hard way using Java, but it suited me fine. Other  
solutions could be similarly implemented with comperable performance but  
perhaps a lot less development time in Python with Django, or Node.js, or  
Ruby on Rails. But Java worked well for me; Netty is fast and easy to work  
with, and the LMAX Disruptor offers a near-zero latency nearly lockless  
queuing, and together they keep the thread count low while still handling  
many many more requests at one time.

This sounds like a lot of work, but the hard work is a one-off kind of  
thing, and then the business logic can be easily tuned, fixed, and extended  
without much effort. Even things that Elasticsearch does not do and will  
never do (such as foreign keys and enforced consistency across types or  
even indices) are relatively easily done within the custom business logic  
of a front-end server.

Again, I don't offer this as a strong suggestion but rather as a case study  
of what worked well for me.

Brian

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a5011573-970d-4d4c-839d-a274e4d4cc34%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a5011573-970d-4d4c-839d-a274e4d4cc34%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mario\_Mueller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_mueller/32/1466_2.png) [@Mario\_Mueller](https://discuss.elastic.co/u/Mario_Mueller)\
**Post date:** [June 6, 2014, 5:14am UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/13 "2014-06-06T05:14:00Z")

</div>

You guys are totally awesome! Thanks a lot! If you ever visit Duesseldorf  
drop me a line, I owe you a beer.

@Brian:  
Interesting approach, but wouldn't this go against the initial "no  
additional proxy" statement, if I got you right ..

Am Donnerstag, 5. Juni 2014 19:45:33 UTC+2 schrieb Mario Mueller:

> Hey folks,
> 
> I kindly ask for a hint to achieve the following thing:
> 
> The goal is to deliver only a json array of source objects to the client.  
> The php app that sits on the other side uses JMS\Serializer to deserialize  
> the response into entities. At the moment the app needs to take an overhead  
> to derserialize it, extract the source and serialize it again. Then the  
> serialized stuff is passed to the entity deserializer. That's really  
> painful.
> 
> I've found a thread that suggests a proxy in between to handle this type  
> of problem, but this is not possible in our env.
> 
> The real question is: Is this achievable by writing a plugin? And if so,  
> what type of plugin? I've looked at the RestFilter, but I don't know if  
> this is the right way to go...
> 
> Any hints are welcome!
> 
> Regards,  
> Mario

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b27db27a-b136-4a3b-81b5-16d60047540d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b27db27a-b136-4a3b-81b5-16d60047540d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [June 6, 2014, 7:09am UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/14 "2014-06-06T07:09:32Z")

</div>

I drink Kölsch only 🙂 ävver et hätt noh immer joot jejange

Greetings from Cologne!

Jörg

On Fri, Jun 6, 2014 at 7:14 AM, Mario Mueller [mario@xenji.com](mailto:mario@xenji.com) wrote:

> You guys are totally awesome! Thanks a lot! If you ever visit Duesseldorf  
> drop me a line, I owe you a beer.
> 
> @Brian:  
> Interesting approach, but wouldn't this go against the initial "no  
> additional proxy" statement, if I got you right ..
> 
> Am Donnerstag, 5. Juni 2014 19:45:33 UTC+2 schrieb Mario Mueller:
> 
> > Hey folks,
> > 
> > I kindly ask for a hint to achieve the following thing:
> > 
> > The goal is to deliver only a json array of source objects to the client.  
> > The php app that sits on the other side uses JMS\Serializer to deserialize  
> > the response into entities. At the moment the app needs to take an overhead  
> > to derserialize it, extract the source and serialize it again. Then the  
> > serialized stuff is passed to the entity deserializer. That's really  
> > painful.
> > 
> > I've found a thread that suggests a proxy in between to handle this type  
> > of problem, but this is not possible in our env.
> > 
> > The real question is: Is this achievable by writing a plugin? And if so,  
> > what type of plugin? I've looked at the RestFilter, but I don't know if  
> > this is the right way to go...
> > 
> > Any hints are welcome!
> > 
> > Regards,  
> > Mario
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/b27db27a-b136-4a3b-81b5-16d60047540d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b27db27a-b136-4a3b-81b5-16d60047540d%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/b27db27a-b136-4a3b-81b5-16d60047540d%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b27db27a-b136-4a3b-81b5-16d60047540d%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHKWraQG7iMiUiV5ucR8VdLO2nxruVX5Vq\_P%3D1zcB6WGQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHKWraQG7iMiUiV5ucR8VdLO2nxruVX5Vq_P%3D1zcB6WGQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mario\_Mueller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_mueller/32/1466_2.png) [@Mario\_Mueller](https://discuss.elastic.co/u/Mario_Mueller)\
**Post date:** [June 6, 2014, 7:50am UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/15 "2014-06-06T07:50:43Z")

</div>

Et kütt wie et kütt 😉 Das mit dem Koelsch geht klar, gibts auch hier in  
DUS.

Again thanks to all!

Am Freitag, 6. Juni 2014 09:09:39 UTC+2 schrieb Jörg Prante:

> I drink Kölsch only 🙂 ävver et hätt noh immer joot jejange
> 
> Greetings from Cologne!
> 
> Jörg
> 
> On Fri, Jun 6, 2014 at 7:14 AM, Mario Mueller \<[ma...@xenji.com](mailto:ma...@xenji.com)  
> \<javascript:\>\> wrote:
> 
> > You guys are totally awesome! Thanks a lot! If you ever visit Duesseldorf  
> > drop me a line, I owe you a beer.
> > 
> > @Brian:  
> > Interesting approach, but wouldn't this go against the initial "no  
> > additional proxy" statement, if I got you right ..
> > 
> > Am Donnerstag, 5. Juni 2014 19:45:33 UTC+2 schrieb Mario Mueller:
> > 
> > > Hey folks,
> > > 
> > > I kindly ask for a hint to achieve the following thing:
> > > 
> > > The goal is to deliver only a json array of source objects to the  
> > > client. The php app that sits on the other side uses JMS\Serializer to  
> > > deserialize the response into entities. At the moment the app needs to take  
> > > an overhead to derserialize it, extract the source and serialize it again.  
> > > Then the serialized stuff is passed to the entity deserializer. That's  
> > > really painful.
> > > 
> > > I've found a thread that suggests a proxy in between to handle this type  
> > > of problem, but this is not possible in our env.
> > > 
> > > The real question is: Is this achievable by writing a plugin? And if so,  
> > > what type of plugin? I've looked at the RestFilter, but I don't know if  
> > > this is the right way to go...
> > > 
> > > Any hints are welcome!
> > > 
> > > Regards,  
> > > Mario
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/b27db27a-b136-4a3b-81b5-16d60047540d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b27db27a-b136-4a3b-81b5-16d60047540d%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/b27db27a-b136-4a3b-81b5-16d60047540d%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b27db27a-b136-4a3b-81b5-16d60047540d%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/d8c20589-1f4b-4b87-b140-ec7126e5bbe2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d8c20589-1f4b-4b87-b140-ec7126e5bbe2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![brian\_yoder](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@brian\_yoder](https://discuss.elastic.co/u/brian_yoder)\
**Post date:** [June 6, 2014, 2:23pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/16 "2014-06-06T14:23:40Z")

</div>

Hi, Mario. Yes, I suppose this kind of goes against the "no additional  
proxy" requirement you have.

Hehehe. I'm a seeker of loopholes. In my scenario, it's still a plug-in  
design, but ES is my plug-in and not the other way around. Still only one  
HTTP interface in the mix, but it's mine and not ES's.

I also have avoided the plug-in approach because I've read that it's marked  
for deprecation and eventual removal. Yet logstash and ES Head are still  
offered as plug-ins as are a boat-load of other facilities, so I am not  
really sure if that's still the case.

And of course, your own plug-in has a much better chance to be updated to  
match exactly each new ES version to which you migrate. That's one of the  
downsides of third-party plug-ins: They lock you into older ES versions  
until the author gets a chance to update the plug-in.

Brian

On Friday, June 6, 2014 1:14:00 AM UTC-4, Mario Mueller wrote:

> @Brian:  
> Interesting approach, but wouldn't this go against the initial "no  
> additional proxy" statement, if I got you right ..

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/287ee9f9-b6cd-47d1-937e-f38406a614a1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/287ee9f9-b6cd-47d1-937e-f38406a614a1%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 6, 2014, 4:28pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/17 "2014-06-06T16:28:48Z")

</div>

Plugins are essential to ES's success and are not going away any time soon.  
The river plugins, aka cluster singletons, are the ones which are  
discouraged from use. Good ahead and create more plugins!

--  
Ivan

On Fri, Jun 6, 2014 at 7:23 AM, Brian [brian.from.fl@gmail.com](mailto:brian.from.fl@gmail.com) wrote:

> I also have avoided the plug-in approach because I've read that it's  
> marked for deprecation and eventual removal. Yet logstash and ES Head are  
> still offered as plug-ins as are a boat-load of other facilities, so I am  
> not really sure if that's still the case.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBEXPBJ5HTqT8YK25w\_qjioYzGuXebQ%3DVvrE5HHmUMNvw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBEXPBJ5HTqT8YK25w_qjioYzGuXebQ%3DVvrE5HHmUMNvw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![brian\_yoder](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@brian\_yoder](https://discuss.elastic.co/u/brian_yoder)\
**Post date:** [June 6, 2014, 6:02pm UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/18 "2014-06-06T18:02:00Z")

</div>

Thanks so much, Ivan. That's a very important distinction.

Brian

On Friday, June 6, 2014 12:28:56 PM UTC-4, Ivan Brusic wrote:

> Plugins are essential to ES's success and are not going away any time  
> soon. The river plugins, aka cluster singletons, are the ones which are  
> discouraged from use. Good ahead and create more plugins!
> 
> --  
> Ivan

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/fc5afbff-469c-4a02-8fa9-8190a82ce5fb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fc5afbff-469c-4a02-8fa9-8190a82ce5fb%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:24am UTC](https://discuss.elastic.co/t/a-plugin-to-change-the-result-set-before-sending-it-back-to-the-http-client/17934/19 "2017-07-06T01:24:07Z")

</div>


