# New API request for MultiGet

**URL:** <https://discuss.elastic.co/t/new-api-request-for-multiget/21098>\
**Category:** Elasticsearch\
**Created:** [December 5, 2014, 4:31am UTC](https://discuss.elastic.co/t/new-api-request-for-multiget/21098 "2014-12-05T04:31:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ted\_Smith](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@Ted\_Smith](https://discuss.elastic.co/u/Ted_Smith)\
**Post date:** [December 5, 2014, 4:31am UTC](https://discuss.elastic.co/t/new-api-request-for-multiget/21098/1 "2014-12-05T04:31:51Z")

</div>

Hello:

I am trying to get a list of docs (same index and type) using a list of  
"ids", but only limited to certain "fields"  
instead of whole doc  
Currently I am doing as below

MultiGetRequestBuilder mr;  
for (String id : ids)  
{  
Item item = new Item(index, type, id).fields(fields);  
mr.add(item);  
}  
MultiGetResponse res = mr.execute().actionGet();

Is there plan to have new API so that I could do

mr.add(index, type,ids).fields(fields)

this would make a huge performance difference at client side (maybe service  
side as well)

Thanks

--  
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/cd45203a-add8-437c-99b5-b5740660f6cd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cd45203a-add8-437c-99b5-b5740660f6cd%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, 12:45am UTC](https://discuss.elastic.co/t/new-api-request-for-multiget/21098/2 "2017-07-06T00:45:41Z")

</div>


