# When ES excludes fields from source

**URL:** https://discuss.elastic.co/t/when-es-excludes-fields-from-source/11991
**Category:** Elasticsearch
**Created:** [May 16, 2013, 8:20am UTC](https://discuss.elastic.co/t/when-es-excludes-fields-from-source/11991 "2013-05-16T08:20:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Pawel\_Mlynarczyk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pawel_mlynarczyk/32/1568_2.png) [@Pawel\_Mlynarczyk](https://discuss.elastic.co/u/Pawel_Mlynarczyk)
#### Post date: [May 16, 2013, 8:20am UTC](https://discuss.elastic.co/t/when-es-excludes-fields-from-source/11991/1 "2013-05-16T08:20:07Z")

</div>

Hello everyone

I'd like to know, when does excluding fields from source take place? (When  
the document is being written or each time it is read?)  
Also, does excluding have a big impact on performance?  
Would that be better to group all excluded fields in one path and use a  
wildcard ("path.\*") instead of having multiple excluded fields all around  
the document?

Thanks in advance  
Paweł Młynarczyk

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Boaz\_Leskes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boaz_leskes/32/723_2.png) [@Boaz\_Leskes](https://discuss.elastic.co/u/Boaz_Leskes)
#### Post date: [May 16, 2013, 3:11pm UTC](https://discuss.elastic.co/t/when-es-excludes-fields-from-source/11991/2 "2013-05-16T15:11:23Z")

</div>

Hi Pawel,

The exclude and include settings of the \_source mapping are applied just  
before the document is stored in the index. It is a very light weight  
operation. Performance wise it doesn't really matter if you wild cards or  
not. I would just whatever feels more tidy to you.

Cheers,  
Boaz

On Thursday, May 16, 2013 10:20:07 AM UTC+2, Paweł Młynarczyk wrote:

> Hello everyone
> 
> I'd like to know, when does excluding fields from source take place? (When  
> the document is being written or each time it is read?)  
> Also, does excluding have a big impact on performance?  
> Would that be better to group all excluded fields in one path and use a  
> wildcard ("path.\*") instead of having multiple excluded fields all around  
> the document?
> 
> Thanks in advance  
> Paweł Młynarczyk

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:36am UTC](https://discuss.elastic.co/t/when-es-excludes-fields-from-source/11991/3 "2017-07-06T02:36:16Z")

</div>


