# SearchRequestBuilder.setNoFields in ES 5

**URL:** <https://discuss.elastic.co/t/searchrequestbuilder-setnofields-in-es-5/78543>\
**Category:** Elasticsearch\
**Created:** [March 14, 2017, 3:01pm UTC](https://discuss.elastic.co/t/searchrequestbuilder-setnofields-in-es-5/78543 "2017-03-14T15:01:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elastic\_boston](https://avatars.discourse-cdn.com/v4/letter/e/a183cd/32.png) [@elastic\_boston](https://discuss.elastic.co/u/elastic_boston)\
**Post date:** [March 14, 2017, 3:01pm UTC](https://discuss.elastic.co/t/searchrequestbuilder-setnofields-in-es-5/78543/1 "2017-03-14T15:01:04Z")

</div>

In ES1, there was an API call as  
(new SearchRequestBuilder).setNoFields();  
which 'Sets no fields to be loaded, resulting in only id and type to be returned per field.'

Is there a corresponding method in ES5 please?

---

<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:** [April 11, 2017, 3:01pm UTC](https://discuss.elastic.co/t/searchrequestbuilder-setnofields-in-es-5/78543/2 "2017-04-11T15:01:09Z")

</div>

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