# MultiGet with fields to return

**URL:** <https://discuss.elastic.co/t/multiget-with-fields-to-return/5248>\
**Category:** Elasticsearch\
**Created:** [August 25, 2011, 2:21pm UTC](https://discuss.elastic.co/t/multiget-with-fields-to-return/5248 "2011-08-25T14:21:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexander\_bau](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@alexander\_bau](https://discuss.elastic.co/u/alexander_bau)\
**Post date:** [August 25, 2011, 2:21pm UTC](https://discuss.elastic.co/t/multiget-with-fields-to-return/5248/1 "2011-08-25T14:21:55Z")

</div>

Hi,

is it possible to specify the fields to return in a MultiGet (like it  
is in a regular Get)?

If not: is it planned to implement this feature in a future release?

Regards,

Alex

---

<div class="post-metadata">

**Author:** ![Jurgen\_kartnaller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jurgen_kartnaller/32/3086_2.png) [@Jurgen\_kartnaller](https://discuss.elastic.co/u/Jurgen_kartnaller)\
**Post date:** [August 26, 2011, 10:21am UTC](https://discuss.elastic.co/t/multiget-with-fields-to-return/5248/2 "2011-08-26T10:21:45Z")

</div>

It is implemented:

MultiGetRequestBuilder request = client.prepareMultiGet();  
for (String id : ids) {  
request.add(new MultiGetRequest.Item("users", "calculated",  
id).fields("network\_impact"));  
}  
MultiGetResponse result = request.execute().actionGet();

On Thu, Aug 25, 2011 at 4:21 PM, [alexander.bau@unister-gmbh.de](mailto:alexander.bau@unister-gmbh.de) \<  
[alexander.bau@unister-gmbh.de](mailto:alexander.bau@unister-gmbh.de)\> wrote:

> Hi,
> 
> is it possible to specify the fields to return in a MultiGet (like it  
> is in a regular Get)?
> 
> If not: is it planned to implement this feature in a future release?
> 
> Regards,
> 
> Alex

---

<div class="post-metadata">

**Author:** ![alexander\_bau](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@alexander\_bau](https://discuss.elastic.co/u/alexander_bau)\
**Post date:** [August 26, 2011, 10:43am UTC](https://discuss.elastic.co/t/multiget-with-fields-to-return/5248/3 "2011-08-26T10:43:51Z")

</div>

Oh, I've accidentally overlooked this in the Java docs.

Thank you.

Alex

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [August 26, 2011, 2:37pm UTC](https://discuss.elastic.co/t/multiget-with-fields-to-return/5248/4 "2011-08-26T14:37:10Z")

</div>

Its not documented on the REST API, it will be once I can push again to  
github: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/multi-get.html).

I remember one thing I did not like about it, which is the verbosity of this  
case. I will fix that:  
[Multi Get: Allow to specify fields to fetch in the URI, and apply it automatically to all docs to get without explicit fields · Issue #1281 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1281).

On Thu, Aug 25, 2011 at 5:21 PM, [alexander.bau@unister-gmbh.de](mailto:alexander.bau@unister-gmbh.de) \<  
[alexander.bau@unister-gmbh.de](mailto:alexander.bau@unister-gmbh.de)\> wrote:

> Hi,
> 
> is it possible to specify the fields to return in a MultiGet (like it  
> is in a regular Get)?
> 
> If not: is it planned to implement this feature in a future release?
> 
> Regards,
> 
> Alex

---

<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, 3:55am UTC](https://discuss.elastic.co/t/multiget-with-fields-to-return/5248/5 "2017-07-06T03:55:53Z")

</div>


