# Disabling \_source but still seeing the results on query

**URL:** <https://discuss.elastic.co/t/disabling--source-but-still-seeing-the-results-on-query/7628>\
**Category:** Elasticsearch\
**Created:** [May 10, 2012, 9:08am UTC](https://discuss.elastic.co/t/disabling--source-but-still-seeing-the-results-on-query/7628 "2012-05-10T09:08:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Catalin\_Constantin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/catalin_constantin/32/2075_2.png) [@Catalin\_Constantin](https://discuss.elastic.co/u/Catalin_Constantin)\
**Post date:** [May 10, 2012, 9:08am UTC](https://discuss.elastic.co/t/disabling--source-but-still-seeing-the-results-on-query/7628/1 "2012-05-10T09:08:50Z")

</div>

Hello. I'm using pyes (python client) and when creating an index, i set  
\_source.enabled to False and \_index.enabled to False like this:  
esconn.create\_index(index\_name, {"\_source": {"enabled": False}, "\_index":  
{"enabled": False}, "include\_in\_all": False})  
I still get the \_source parameter filled in the query results.

What do i do wrong ?

Thank you!

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [May 10, 2012, 9:26am UTC](https://discuss.elastic.co/t/disabling--source-but-still-seeing-the-results-on-query/7628/2 "2012-05-10T09:26:58Z")

</div>

try adding  
store to false for each field.

In my understanding ES , keep 3 copy of each fields , one in \_source ,  
other in \_all and other as store.

Thanks  
Vineeth

On Thu, May 10, 2012 at 2:38 PM, Catalin Constantin [dazoot@gmail.com](mailto:dazoot@gmail.com)wrote:

> Hello. I'm using pyes (python client) and when creating an index, i set  
> \_source.enabled to False and \_index.enabled to False like this:  
> esconn.create\_index(index\_name, {"\_source": {"enabled": False}, "\_index":  
> {"enabled": False}, "include\_in\_all": False})  
> I still get the \_source parameter filled in the query results.
> 
> What do i do wrong ?
> 
> Thank you!

---

<div class="post-metadata">

**Author:** ![Catalin\_Constantin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/catalin_constantin/32/2075_2.png) [@Catalin\_Constantin](https://discuss.elastic.co/u/Catalin_Constantin)\
**Post date:** [May 10, 2012, 9:38am UTC](https://discuss.elastic.co/t/disabling--source-but-still-seeing-the-results-on-query/7628/3 "2012-05-10T09:38:47Z")

</div>

Each field in the mapping has store: "no".

"email": {"type": "string", "indexed": "analyzed", "store": "no",  
"boost": 1 },

I can still see "email" in the search results.

Any other hints ?

joi, 10 mai 2012, 12:26:58 UTC+3, Vineeth Mohan a scris:

> try adding  
> store to false for each field.
> 
> In my understanding ES , keep 3 copy of each fields , one in \_source ,  
> other in \_all and other as store.
> 
> Thanks  
> Vineeth
> 
> On Thu, May 10, 2012 at 2:38 PM, Catalin Constantin [dazoot@gmail.com](mailto:dazoot@gmail.com)wrote:
> 
> > Hello. I'm using pyes (python client) and when creating an index, i set  
> > \_source.enabled to False and \_index.enabled to False like this:  
> > esconn.create\_index(index\_name, {"\_source": {"enabled": False}, "\_index":  
> > {"enabled": False}, "include\_in\_all": False})  
> > I still get the \_source parameter filled in the query results.
> > 
> > What do i do wrong ?
> > 
> > Thank you!

---

<div class="post-metadata">

**Author:** ![Andrew\_at\_DataFeedFi](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@Andrew\_at\_DataFeedFi](https://discuss.elastic.co/u/Andrew_at_DataFeedFi)\
**Post date:** [May 10, 2012, 2:52pm UTC](https://discuss.elastic.co/t/disabling--source-but-still-seeing-the-results-on-query/7628/4 "2012-05-10T14:52:57Z")

</div>

Where do you see 'email' in the result?  
In the \_source section of each result?  
Can you paste your query and result here.

--Andrew

On May 10, 4:38 am, Catalin Constantin [daz...@gmail.com](mailto:daz...@gmail.com) wrote:

> Each field in the mapping has store: "no".
> 
> "email": {"type": "string", "indexed": "analyzed", "store": "no",  
> "boost": 1 },
> 
> I can still see "email" in the search results.
> 
> Any other hints ?
> 
> joi, 10 mai 2012, 12:26:58 UTC+3, Vineeth Mohan a scris:
> 
> > try adding  
> > store to false for each field.
> 
> > In my understanding ES , keep 3 copy of each fields , one in \_source ,  
> > other in \_all and other as store.
> 
> > Thanks  
> > Vineeth
> 
> > On Thu, May 10, 2012 at 2:38 PM, Catalin Constantin [daz...@gmail.com](mailto:daz...@gmail.com)wrote:
> 
> > > Hello. I'm using pyes (python client) and when creating an index, i set  
> > > \_source.enabled to False and \_index.enabled to False like this:  
> > > esconn.create\_index(index\_name, {"\_source": {"enabled": False}, "\_index":  
> > > {"enabled": False}, "include\_in\_all": False})  
> > > I still get the \_source parameter filled in the query results.
> 
> > > What do i do wrong ?
> 
> > > Thank you!

---

<div class="post-metadata">

**Author:** ![Jeremie\_BORDIER1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeremie_bordier1/32/2860_2.png) [@Jeremie\_BORDIER1](https://discuss.elastic.co/u/Jeremie_BORDIER1)\
**Post date:** [May 10, 2012, 4:56pm UTC](https://discuss.elastic.co/t/disabling--source-but-still-seeing-the-results-on-query/7628/5 "2012-05-10T16:56:21Z")

</div>

If you're seeing that when doing a "Get" query, it's because the  
document is fetched from the transaction log, it's a bug solved in the  
master branch that will be rolled out in 0.19.4.

Jérémie

On Thu, May 10, 2012 at 4:52 PM, Andrew[.:at:.][DataFeedFile.com](http://DataFeedFile.com)  
[andrew@datafeedfile.com](mailto:andrew@datafeedfile.com) wrote:

> Where do you see 'email' in the result?  
> In the \_source section of each result?  
> Can you paste your query and result here.
> 
> --Andrew
> 
> On May 10, 4:38 am, Catalin Constantin [daz...@gmail.com](mailto:daz...@gmail.com) wrote:
> 
> > Each field in the mapping has store: "no".
> > 
> > "email": {"type": "string", "indexed": "analyzed", "store": "no",  
> > "boost": 1 },
> > 
> > I can still see "email" in the search results.
> > 
> > Any other hints ?
> > 
> > joi, 10 mai 2012, 12:26:58 UTC+3, Vineeth Mohan a scris:
> > 
> > > try adding  
> > > store to false for each field.
> > 
> > > In my understanding ES , keep 3 copy of each fields , one in \_source ,  
> > > other in \_all and other as store.
> > 
> > > Thanks  
> > > Vineeth
> > 
> > > On Thu, May 10, 2012 at 2:38 PM, Catalin Constantin [daz...@gmail.com](mailto:daz...@gmail.com)wrote:
> > 
> > > > Hello. I'm using pyes (python client) and when creating an index, i set  
> > > > \_source.enabled to False and \_index.enabled to False like this:  
> > > > esconn.create\_index(index\_name, {"\_source": {"enabled": False}, "\_index":  
> > > > {"enabled": False}, "include\_in\_all": False})  
> > > > I still get the \_source parameter filled in the query results.
> > 
> > > > What do i do wrong ?
> > 
> > > > Thank you!

--  
Jérémie 'ahFeel' BORDIER

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 10, 2012, 9:20pm UTC](https://discuss.elastic.co/t/disabling--source-but-still-seeing-the-results-on-query/7628/6 "2012-05-10T21:20:42Z")

</div>

Just to correct this answer (sorry Vineeh), ES doesn't keep 3 copies of the  
data by default. By default, it keeps only one copy, which is the full json  
document stored. The default "store" for specific fields is false, and most  
times, should not be set to true (unless you really want to store that  
field separately as well).

On Thu, May 10, 2012 at 12:26 PM, Vineeth Mohan  
[vineethmohan@algotree.com](mailto:vineethmohan@algotree.com)wrote:

> try adding  
> store to false for each field.
> 
> In my understanding ES , keep 3 copy of each fields , one in \_source ,  
> other in \_all and other as store.
> 
> Thanks  
> Vineeth
> 
> On Thu, May 10, 2012 at 2:38 PM, Catalin Constantin [dazoot@gmail.com](mailto:dazoot@gmail.com)wrote:
> 
> > Hello. I'm using pyes (python client) and when creating an index, i set  
> > \_source.enabled to False and \_index.enabled to False like this:  
> > esconn.create\_index(index\_name, {"\_source": {"enabled": False}, "\_index":  
> > {"enabled": False}, "include\_in\_all": False})  
> > I still get the \_source parameter filled in the query results.
> > 
> > What do i do wrong ?
> > 
> > Thank you!

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 10, 2012, 9:21pm UTC](https://discuss.elastic.co/t/disabling--source-but-still-seeing-the-results-on-query/7628/7 "2012-05-10T21:21:25Z")

</div>

- Can you do a get mapping and see if the mapping you set are actually set?
- Verifying: you say you get the \_source when searching, right?

On Thu, May 10, 2012 at 12:38 PM, Catalin Constantin [dazoot@gmail.com](mailto:dazoot@gmail.com)wrote:

> Each field in the mapping has store: "no".
> 
> "email": {"type": "string", "indexed": "analyzed", "store": "no",  
> "boost": 1 },
> 
> I can still see "email" in the search results.
> 
> Any other hints ?
> 
> joi, 10 mai 2012, 12:26:58 UTC+3, Vineeth Mohan a scris:
> 
> > try adding  
> > store to false for each field.
> > 
> > In my understanding ES , keep 3 copy of each fields , one in \_source ,  
> > other in \_all and other as store.
> > 
> > Thanks  
> > Vineeth
> > 
> > On Thu, May 10, 2012 at 2:38 PM, Catalin Constantin [dazoot@gmail.com](mailto:dazoot@gmail.com)wrote:
> > 
> > > Hello. I'm using pyes (python client) and when creating an index, i set  
> > > \_source.enabled to False and _index.enabled to False like this:  
> > > esconn.create\_index(index_\*\*name, {"\_source": {"enabled": False},  
> > > "\_index": {"enabled": False}, "include\_in\_all": False})  
> > > I still get the \_source parameter filled in the query results.
> > > 
> > > What do i do wrong ?
> > > 
> > > Thank you!

---

<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, 3:29am UTC](https://discuss.elastic.co/t/disabling--source-but-still-seeing-the-results-on-query/7628/8 "2017-07-06T03:29:22Z")

</div>


