# GetRequest with fields issue

**URL:** <https://discuss.elastic.co/t/getrequest-with-fields-issue/3065>\
**Category:** Elasticsearch\
**Created:** [July 2, 2010, 9:36pm UTC](https://discuss.elastic.co/t/getrequest-with-fields-issue/3065 "2010-07-02T21:36:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samuel\_Doyle](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Samuel\_Doyle](https://discuss.elastic.co/u/Samuel_Doyle)\
**Post date:** [July 2, 2010, 9:36pm UTC](https://discuss.elastic.co/t/getrequest-with-fields-issue/3065/1 "2010-07-02T21:36:21Z")

</div>

Hi,

I have tried using the GetRequest using the fields method prior to the  
request to limit the set of fields I want back.  
The response shows the document exists but the source is null.

If I don't provide any fields using he same id I get everything back. The  
fields I specified in the previous request do exist in this response.

Thanks

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [July 3, 2010, 9:02am UTC](https://discuss.elastic.co/t/getrequest-with-fields-issue/3065/2 "2010-07-03T09:02:56Z")

</div>

On Fri, 2010-07-02 at 14:36 -0700, Samuel Doyle wrote:

> Hi,
> 
> I have tried using the GetRequest using the fields method prior to the  
> request to limit the set of fields I want back.  
> The response shows the document exists but the source is null.

Have you set the fields you want returned to { "store": "yes" } ?

If not, then they aren't stored in a form that can be returned to you.

> If I don't provide any fields using he same id I get everything back.  
> The fields I specified in the previous request do exist in this  
> response.

The \_source field IS stored, and what is returned to you is the same  
JSON that you passed it. But the fields inside that \_source are not  
stored.

clint

> Thanks  
> --  
> Web Announcements Limited is a company registered in England and Wales,  
> with company number 05608868, with registered address at 10 Arvon Road,  
> London, N5 1PR.

---

<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, 4:22am UTC](https://discuss.elastic.co/t/getrequest-with-fields-issue/3065/3 "2017-07-06T04:22:43Z")

</div>


