# "excludes" and "includes" for \_source has no effect?

**URL:** https://discuss.elastic.co/t/excludes-and-includes-for--source-has-no-effect/11363
**Category:** Elasticsearch
**Created:** [March 28, 2013, 6:12pm UTC](https://discuss.elastic.co/t/excludes-and-includes-for--source-has-no-effect/11363 "2013-03-28T18:12:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)
#### Post date: [March 28, 2013, 6:12pm UTC](https://discuss.elastic.co/t/excludes-and-includes-for--source-has-no-effect/11363/1 "2013-03-28T18:12:36Z")

</div>

Hello,

As far as I've tested, the "includes" and "excludes" options for the \_source  
field [http://www.elasticsearch.org/guide/reference/mapping/source-field/](http://www.elasticsearch.org/guide/reference/mapping/source-field/)have  
no effect - I always get the whole source. Here's a gist for  
recreating:

> <https://gist.github.com/radu-gheorghe/5265495>

Did I do something wrong on my tests? If yes, how is it supposed to work?

Any pointers will be appreciated. I'm on 64-bit Ubuntu and I've used the  
.deb packages of 0.19.7 and 0.90.0RC1 with the same results.

## Thanks and best regards, Radu

[http://sematext.com/](http://sematext.com/) -- ElasticSearch -- Solr -- Lucene

--  
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: ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)
#### Post date: [March 28, 2013, 6:38pm UTC](https://discuss.elastic.co/t/excludes-and-includes-for--source-has-no-effect/11363/2 "2013-03-28T18:38:09Z")

</div>

> Did I do something wrong on my tests? If yes, how is it supposed to  
> work?

Hmm - it doesn't work for get-by-id. It works for search though.  
Flushing the index helped, so it looks like its a translog thing

please open an issue

ta

clint

> Any pointers will be appreciated. I'm on 64-bit Ubuntu and I've used  
> the .deb packages of 0.19.7 and 0.90.0RC1 with the same results.
> 
> Thanks and best regards,  
> Radu
> 
> ## -- [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> 
> 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).

--  
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: ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)
#### Post date: [March 29, 2013, 8:42am UTC](https://discuss.elastic.co/t/excludes-and-includes-for--source-has-no-effect/11363/3 "2013-03-29T08:42:21Z")

</div>

Thanks a lot, Clint!

I've opened an issue here:  
[https://github.com/elasticsearch/elasticsearch/issues/2829](https://github.com/elasticsearch/elasticsearch/issues/2829)

## Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

On Thu, Mar 28, 2013 at 8:38 PM, Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com)wrote:

> > Did I do something wrong on my tests? If yes, how is it supposed to  
> > work?
> 
> Hmm - it doesn't work for get-by-id. It works for search though.  
> Flushing the index helped, so it looks like its a translog thing
> 
> please open an issue
> 
> ta
> 
> clint
> 
> > Any pointers will be appreciated. I'm on 64-bit Ubuntu and I've used  
> > the .deb packages of 0.19.7 and 0.90.0RC1 with the same results.
> > 
> > Thanks and best regards,  
> > Radu
> > 
> > ## -- [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> > 
> > 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).
> 
> --  
> 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).

--  
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:43am UTC](https://discuss.elastic.co/t/excludes-and-includes-for--source-has-no-effect/11363/4 "2017-07-06T02:43:43Z")

</div>


