# Replacing the GetResult / SearchResult impl. via DI?

**URL:** <https://discuss.elastic.co/t/replacing-the-getresult-searchresult-impl-via-di/17190>\
**Category:** Elasticsearch\
**Created:** [April 25, 2014, 4:55am UTC](https://discuss.elastic.co/t/replacing-the-getresult-searchresult-impl-via-di/17190 "2014-04-25T04:55:32Z")\
**Posts on this page:** 2\
**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:** [April 25, 2014, 4:55am UTC](https://discuss.elastic.co/t/replacing-the-getresult-searchresult-impl-via-di/17190/1 "2014-04-25T04:55:32Z")

</div>

Hey folks,

I'm using the Java client on an embedded running server (on a Wildfly 8,  
standalone-full). To make my life easier for my usecase, I want to  
implement a Result that is capable of using my gson provider (CDI) together  
with a classname to get me the source not only as string, but as my bean of  
choice. Is there any common way to overload the result set (maybe using  
guice?) to make this possible to implement?

The hard way would be to write a delegating proxy for each step ... this  
would work, but feels clumsy and is not a good architectural decision at  
all.

Thanks for any hint!  
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/60aca4c9-8bea-49aa-a3fc-732f67cb39fe%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/60aca4c9-8bea-49aa-a3fc-732f67cb39fe%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:33am UTC](https://discuss.elastic.co/t/replacing-the-getresult-searchresult-impl-via-di/17190/2 "2017-07-06T01:33:38Z")

</div>

Closed on July 6, 2017, 1:33am UTC


