# Hide some system fields

**URL:** <https://discuss.elastic.co/t/hide-some-system-fields/17802>\
**Category:** Elasticsearch\
**Created:** [May 29, 2014, 11:11am UTC](https://discuss.elastic.co/t/hide-some-system-fields/17802 "2014-05-29T11:11:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![11152](https://avatars.discourse-cdn.com/v4/letter/1/90db22/32.png) [@11152](https://discuss.elastic.co/u/11152)\
**Post date:** [May 29, 2014, 11:11am UTC](https://discuss.elastic.co/t/hide-some-system-fields/17802/1 "2014-05-29T11:11:07Z")

</div>

Hi all!  
I use elasticsearch in a high-load project where an urgent need to save  
traffic.  
I have a some queries like this:

curl -XGET '[http://localhost:9200/testindex/testmapping/\_search?pretty&scroll=5m](http://localhost:9200/testindex/testmapping/_search?pretty&scroll=5m)' -d '{"from":0, "size":1000}'

{  
"\_scroll\_id" : "cXVlcnlUaGVuRmV0Y2g7MjszMjp6TmdjNmxkM1NtV1NOeTl5X3dab1FnOzMxOnpOZ2M2bGQzU21XU055OXlfd1pvUWc7MDs=",  
"took" : 2,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 2,  
"successful" : 2,  
"failed" : 0  
},  
"hits" : {  
"total" : 15457332,  
"max\_score" : 1.0,  
"hits" : [ {  
"\_index" : "testindex",  
"\_type" : "testmapping",  
"\_id" : "mo7vQrWUTquBRowjq2AVkw",  
"\_score" : 1.0, "\_source" : {"reffer\_id":"","date":"2013-05-31T00:00:00","source":5,"user\_id":"2fdfdf0fbbce603cf24c0eee7dabf28c"}  
}, ....]  
}  
}

Can I exclude some system fields (like \_shards.\*, hits.\_index, hits.\_type,  
hits.\_id, hits.\_score)? I found how exclude source fields, but not system.  
Also I need to get \_timestamp field in \_source rows. It generated from  
'date' field:

'\_timestamp' =\> array(  
'enabled' =\> true,  
'path' =\> 'date',  
'format' =\> "YYYY-MM-dd'T'HH:mm:ss"  
)

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/cbc201ec-42b1-47a6-9186-2d240ae669c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cbc201ec-42b1-47a6-9186-2d240ae669c3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Florentin\_Zorca](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@Florentin\_Zorca](https://discuss.elastic.co/u/Florentin_Zorca)\
**Post date:** [May 29, 2014, 12:29pm UTC](https://discuss.elastic.co/t/hide-some-system-fields/17802/2 "2014-05-29T12:29:03Z")

</div>

Hi,

try using fields to specify only the fields you are interested in:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Your query should then be something like this:

{"fields":["date"], "from":0, "size":1000}

Kind Regards,

Florentin

Am Donnerstag, 29. Mai 2014 13:11:07 UTC+2 schrieb Сергей Шилов:

> Hi all!  
> I use elasticsearch in a high-load project where an urgent need to save  
> traffic.  
> I have a some queries like this:
> 
> curl -XGET '[http://localhost:9200/testindex/testmapping/\_search?pretty&scroll=5m](http://localhost:9200/testindex/testmapping/_search?pretty&scroll=5m)' -d '{"from":0, "size":1000}'
> 
> {  
> "\_scroll\_id" : "cXVlcnlUaGVuRmV0Y2g7MjszMjp6TmdjNmxkM1NtV1NOeTl5X3dab1FnOzMxOnpOZ2M2bGQzU21XU055OXlfd1pvUWc7MDs=",  
> "took" : 2,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 2,  
> "successful" : 2,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : 15457332,  
> "max\_score" : 1.0,  
> "hits" : [ {  
> "\_index" : "testindex",  
> "\_type" : "testmapping",  
> "\_id" : "mo7vQrWUTquBRowjq2AVkw",  
> "\_score" : 1.0, "\_source" : {"reffer\_id":"","date":"2013-05-31T00:00:00","source":5,"user\_id":"2fdfdf0fbbce603cf24c0eee7dabf28c"}  
> }, ....]  
> }  
> }
> 
> Can I exclude some system fields (like \_shards.\*, hits.\_index, hits.\_type,  
> hits.\_id, hits.\_score)? I found how exclude source fields, but not system.  
> Also I need to get \_timestamp field in \_source rows. It generated from  
> 'date' field:
> 
> '\_timestamp' =\> array(  
> 'enabled' =\> true,  
> 'path' =\> 'date',  
> 'format' =\> "YYYY-MM-dd'T'HH:mm:ss"  
> )
> 
> 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/16245f90-64fc-4a39-adf4-71663e91d950%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/16245f90-64fc-4a39-adf4-71663e91d950%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [May 29, 2014, 9:25pm UTC](https://discuss.elastic.co/t/hide-some-system-fields/17802/3 "2014-05-29T21:25:14Z")

</div>

I do not think you can exclude the search metadata fields.

--  
Ivan

On Thu, May 29, 2014 at 5:29 AM, Florentin Zorca [google@zorca.de](mailto:google@zorca.de) wrote:

> Hi,
> 
> try using fields to specify only the fields you are interested in:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-fields.html#search-request-fields)
> 
> Your query should then be something like this:
> 
> {"fields":["date"], "from":0, "size":1000}
> 
> Kind Regards,
> 
> Florentin
> 
> Am Donnerstag, 29. Mai 2014 13:11:07 UTC+2 schrieb Сергей Шилов:
> 
> > Hi all!  
> > I use elasticsearch in a high-load project where an urgent need to save  
> > traffic.  
> > I have a some queries like this:
> > 
> > curl -XGET '[http://localhost:9200/testindex/testmapping/\_search?pretty&scroll=5m](http://localhost:9200/testindex/testmapping/_search?pretty&scroll=5m)' -d '{"from":0, "size":1000}'
> > 
> > {  
> > "\_scroll\_id" : "cXVlcnlUaGVuRmV0Y2g7MjszMjp6TmdjNmxkM1NtV1NOeTl5X3dab1FnOzMxOnpOZ2M2bGQzU21XU055OXlfd1pvUWc7MDs=",  
> > "took" : 2,  
> > "timed\_out" : false,  
> > "\_shards" : {  
> > "total" : 2,  
> > "successful" : 2,  
> > "failed" : 0  
> > },  
> > "hits" : {  
> > "total" : 15457332,  
> > "max\_score" : 1.0,  
> > "hits" : [ {  
> > "\_index" : "testindex",  
> > "\_type" : "testmapping",  
> > "\_id" : "mo7vQrWUTquBRowjq2AVkw",  
> > "\_score" : 1.0, "\_source" : {"reffer\_id":"","date":"2013-05-31T00:00:00","source":5,"user\_id":"2fdfdf0fbbce603cf24c0eee7dabf28c"}  
> > }, ....]  
> > }  
> > }
> > 
> > Can I exclude some system fields (like \_shards.\*, hits.\_index,  
> > hits.\_type, hits.\_id, hits.\_score)? I found how exclude source fields, but  
> > not system.  
> > Also I need to get \_timestamp field in \_source rows. It generated from  
> > 'date' field:
> > 
> > '\_timestamp' =\> array(  
> > 'enabled' =\> true,  
> > 'path' =\> 'date',  
> > 'format' =\> "YYYY-MM-dd'T'HH:mm:ss"  
> > )
> > 
> > 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/16245f90-64fc-4a39-adf4-71663e91d950%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/16245f90-64fc-4a39-adf4-71663e91d950%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/16245f90-64fc-4a39-adf4-71663e91d950%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/16245f90-64fc-4a39-adf4-71663e91d950%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CALY%3DcQA0NEzd30i9vrpLv1D5nZY%2BfX9%2BLEKPUesznXa%3D2LL7EQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQA0NEzd30i9vrpLv1D5nZY%2BfX9%2BLEKPUesznXa%3D2LL7EQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [May 29, 2014, 9:29pm UTC](https://discuss.elastic.co/t/hide-some-system-fields/17802/4 "2014-05-29T21:29:37Z")

</div>

Source filtering is similar but normally returns nicer results.

Sent from my iPhone

> On May 29, 2014, at 8:29 AM, Florentin Zorca [google@zorca.de](mailto:google@zorca.de) wrote:
> 
> Hi,
> 
> try using fields to specify only the fields you are interested in:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-fields.html#search-request-fields)
> 
> Your query should then be something like this:  
> {"fields":["date"], "from":0, "size":1000}  
> Kind Regards,  
> Florentin
> 
> Am Donnerstag, 29. Mai 2014 13:11:07 UTC+2 schrieb Сергей Шилов:
> 
> > Hi all!  
> > I use elasticsearch in a high-load project where an urgent need to save traffic.  
> > I have a some queries like this:  
> > curl -XGET '[http://localhost:9200/testindex/testmapping/\_search?pretty&scroll=5m](http://localhost:9200/testindex/testmapping/_search?pretty&scroll=5m)' -d '{"from":0, "size":1000}'
> > 
> > {  
> > "\_scroll\_id" : "cXVlcnlUaGVuRmV0Y2g7MjszMjp6TmdjNmxkM1NtV1NOeTl5X3dab1FnOzMxOnpOZ2M2bGQzU21XU055OXlfd1pvUWc7MDs=",  
> > "took" : 2,  
> > "timed\_out" : false,  
> > "\_shards" : {  
> > "total" : 2,  
> > "successful" : 2,  
> > "failed" : 0  
> > },  
> > "hits" : {  
> > "total" : 15457332,  
> > "max\_score" : 1.0,  
> > "hits" : [ {  
> > "\_index" : "testindex",  
> > "\_type" : "testmapping",  
> > "\_id" : "mo7vQrWUTquBRowjq2AVkw",  
> > "\_score" : 1.0, "\_source" : {"reffer\_id":"","date":"2013-05-31T00:00:00","source":5,"user\_id":"2fdfdf0fbbce603cf24c0eee7dabf28c"}  
> > }, ....]  
> > }  
> > }
> > 
> > Can I exclude some system fields (like \_shards.\*, hits.\_index, hits.\_type, hits.\_id, hits.\_score)? I found how exclude source fields, but not system.  
> > Also I need to get \_timestamp field in \_source rows. It generated from 'date' field:  
> > '\_timestamp' =\> array(  
> > 'enabled' =\> true,  
> > 'path' =\> 'date',  
> > 'format' =\> "YYYY-MM-dd'T'HH:mm:ss"  
> > )
> > 
> > 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/16245f90-64fc-4a39-adf4-71663e91d950%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/16245f90-64fc-4a39-adf4-71663e91d950%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/B13EA515-40ED-4F09-97BA-799B23B98DF8%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/B13EA515-40ED-4F09-97BA-799B23B98DF8%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Gail\_Long](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gail_long/32/1527_2.png) [@Gail\_Long](https://discuss.elastic.co/u/Gail_Long)\
**Post date:** [May 29, 2014, 10:34pm UTC](https://discuss.elastic.co/t/hide-some-system-fields/17802/5 "2014-05-29T22:34:46Z")

</div>

You can use jq to selectively pull JSON values, arrays, and objects from  
elasticsearch returns. It lets you filter out everything except the things  
you want and formats it decently as well. The syntax takes a bit of  
getting used to but once you get it the product makes working with JSON  
output much nicer.

[http://stedolan.github.io/jq/](http://stedolan.github.io/jq/)

On Thursday, May 29, 2014 5:11:07 AM UTC-6, Сергей Шилов wrote:

> Hi all!  
> I use elasticsearch in a high-load project where an urgent need to save  
> traffic.  
> I have a some queries like this:
> 
> curl -XGET '[http://localhost:9200/testindex/testmapping/\_search?pretty&scroll=5m](http://localhost:9200/testindex/testmapping/_search?pretty&scroll=5m)' -d '{"from":0, "size":1000}'
> 
> {  
> "\_scroll\_id" : "cXVlcnlUaGVuRmV0Y2g7MjszMjp6TmdjNmxkM1NtV1NOeTl5X3dab1FnOzMxOnpOZ2M2bGQzU21XU055OXlfd1pvUWc7MDs=",  
> "took" : 2,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 2,  
> "successful" : 2,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : 15457332,  
> "max\_score" : 1.0,  
> "hits" : [ {  
> "\_index" : "testindex",  
> "\_type" : "testmapping",  
> "\_id" : "mo7vQrWUTquBRowjq2AVkw",  
> "\_score" : 1.0, "\_source" : {"reffer\_id":"","date":"2013-05-31T00:00:00","source":5,"user\_id":"2fdfdf0fbbce603cf24c0eee7dabf28c"}  
> }, ....]  
> }  
> }
> 
> Can I exclude some system fields (like \_shards.\*, hits.\_index, hits.\_type,  
> hits.\_id, hits.\_score)? I found how exclude source fields, but not system.  
> Also I need to get \_timestamp field in \_source rows. It generated from  
> 'date' field:
> 
> '\_timestamp' =\> array(  
> 'enabled' =\> true,  
> 'path' =\> 'date',  
> 'format' =\> "YYYY-MM-dd'T'HH:mm:ss"  
> )
> 
> 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/73a11577-11c9-4931-a0cd-a55bf36b8739%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/73a11577-11c9-4931-a0cd-a55bf36b8739%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![11152](https://avatars.discourse-cdn.com/v4/letter/1/90db22/32.png) [@11152](https://discuss.elastic.co/u/11152)\
**Post date:** [May 30, 2014, 1:32pm UTC](https://discuss.elastic.co/t/hide-some-system-fields/17802/6 "2014-05-30T13:32:59Z")

</div>

Thanks a lot!  
i'll try this.  
Also i need \_timestamp field into output. I tried several ways, but to no  
avail.

пятница, 30 мая 2014 г., 2:34:47 UTC+4 пользователь Gail Long написал:

> You can use jq to selectively pull JSON values, arrays, and objects from  
> elasticsearch returns. It lets you filter out everything except the things  
> you want and formats it decently as well. The syntax takes a bit of  
> getting used to but once you get it the product makes working with JSON  
> output much nicer.
> 
> [Redirecting to jqlang.github.io](http://stedolan.github.io/jq/)
> 
> On Thursday, May 29, 2014 5:11:07 AM UTC-6, Сергей Шилов wrote:
> 
> > Hi all!  
> > I use elasticsearch in a high-load project where an urgent need to save  
> > traffic.  
> > I have a some queries like this:
> > 
> > curl -XGET '[http://localhost:9200/testindex/testmapping/\_search?pretty&scroll=5m](http://localhost:9200/testindex/testmapping/_search?pretty&scroll=5m)' -d '{"from":0, "size":1000}'
> > 
> > {  
> > "\_scroll\_id" : "cXVlcnlUaGVuRmV0Y2g7MjszMjp6TmdjNmxkM1NtV1NOeTl5X3dab1FnOzMxOnpOZ2M2bGQzU21XU055OXlfd1pvUWc7MDs=",  
> > "took" : 2,  
> > "timed\_out" : false,  
> > "\_shards" : {  
> > "total" : 2,  
> > "successful" : 2,  
> > "failed" : 0  
> > },  
> > "hits" : {  
> > "total" : 15457332,  
> > "max\_score" : 1.0,  
> > "hits" : [ {  
> > "\_index" : "testindex",  
> > "\_type" : "testmapping",  
> > "\_id" : "mo7vQrWUTquBRowjq2AVkw",  
> > "\_score" : 1.0, "\_source" : {"reffer\_id":"","date":"2013-05-31T00:00:00","source":5,"user\_id":"2fdfdf0fbbce603cf24c0eee7dabf28c"}  
> > }, ....]  
> > }  
> > }
> > 
> > Can I exclude some system fields (like \_shards.\*, hits.\_index,  
> > hits.\_type, hits.\_id, hits.\_score)? I found how exclude source fields, but  
> > not system.  
> > Also I need to get \_timestamp field in \_source rows. It generated from  
> > 'date' field:
> > 
> > '\_timestamp' =\> array(  
> > 'enabled' =\> true,  
> > 'path' =\> 'date',  
> > 'format' =\> "YYYY-MM-dd'T'HH:mm:ss"  
> > )
> > 
> > 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/a7dd7cb7-6f72-46df-9f55-18eab0a152bb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a7dd7cb7-6f72-46df-9f55-18eab0a152bb%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:25am UTC](https://discuss.elastic.co/t/hide-some-system-fields/17802/7 "2017-07-06T01:25:47Z")

</div>


