# \_source disabled

**URL:** <https://discuss.elastic.co/t/-source-disabled/11874>\
**Category:** Elasticsearch\
**Created:** [May 8, 2013, 9:12am UTC](https://discuss.elastic.co/t/-source-disabled/11874 "2013-05-08T09:12:06Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fadel\_Chafai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fadel_chafai/32/1105_2.png) [@Fadel\_Chafai](https://discuss.elastic.co/u/Fadel_Chafai)\
**Post date:** [May 8, 2013, 9:12am UTC](https://discuss.elastic.co/t/-source-disabled/11874/1 "2013-05-08T09:12:06Z")

</div>

hi

how i can get result ( fields ) if \_source field is disabled ??

thank you

--  
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:** ![Rafal\_Kuc\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafal_kuc_3/32/799_2.png) [@Rafal\_Kuc\_3](https://discuss.elastic.co/u/Rafal_Kuc_3)\
**Post date:** [May 8, 2013, 9:15am UTC](https://discuss.elastic.co/t/-source-disabled/11874/2 "2013-05-08T09:15:37Z")

</div>

Hello!

If you disable the \_source field you need to have the contents of the fields stored in order to retrieve them.

_--_

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) _:: Solr - Lucene - Nutch - ElasticSearch_

hi

how i can get result ( fields ) if \_source field is disabled ??

thank you

--

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:** ![Fadel\_Chafai\_2](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@Fadel\_Chafai\_2](https://discuss.elastic.co/u/Fadel_Chafai_2)\
**Post date:** [May 8, 2013, 9:17am UTC](https://discuss.elastic.co/t/-source-disabled/11874/3 "2013-05-08T09:17:28Z")

</div>

how i can do that ?

On Wed, May 8, 2013 at 10:15 AM, Rafał Kuć [r.kuc@solr.pl](mailto:r.kuc@solr.pl) wrote:

> Hello!
> 
> If you disable the \_source field you need to have the contents of the  
> fields stored in order to retrieve them.
> 
> \*--  
> Regards,  
> Rafał Kuć  
> Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> Elasticsearch
> 
> - 
> 
> hi
> 
> how i can get result ( fields ) if \_source field is disabled ??
> 
> ## thank you
> 
> 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 a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US)  
> .  
> To unsubscribe from this group and all its topics, 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:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 8, 2013, 9:17am UTC](https://discuss.elastic.co/t/-source-disabled/11874/4 "2013-05-08T09:17:47Z")

</div>

For fields you want to retrieve, set store to true in mapping.

That said, why do you need to disable source?

HTH  
David

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 8 mai 2013 à 11:12, Fadel Chafai [fadelmohamed@gmail.com](mailto:fadelmohamed@gmail.com) a écrit :

> hi
> 
> how i can get result ( fields ) if \_source field is disabled ??
> 
> ## thank you
> 
> 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:** ![Rafal\_Kuc\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafal_kuc_3/32/799_2.png) [@Rafal\_Kuc\_3](https://discuss.elastic.co/u/Rafal_Kuc_3)\
**Post date:** [May 8, 2013, 9:24am UTC](https://discuss.elastic.co/t/-source-disabled/11874/5 "2013-05-08T09:24:19Z")

</div>

Hello!

For example like this:

{

"mappings": {

"properties": {

```
"name": {"type":"string", "store":"yes" }            

```

}

}

}

}

_--_

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) _:: Solr - Lucene - Nutch - ElasticSearch_

how i can do that ?

On Wed, May 8, 2013 at 10:15 AM, Rafał Kuć \<[r.kuc@solr.pl](mailto:r.kuc@solr.pl)\> wrote:

Hello!

If you disable the \_source field you need to have the contents of the fields stored in order to retrieve them.

_--_

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) _:: Solr - Lucene - Nutch - ElasticSearch_

hi

how i can get result ( fields ) if \_source field is disabled ??

thank you

--

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%2Bunsubscribe@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 a topic in the Google Groups "elasticsearch" group.

To unsubscribe from this topic, visit [https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US).

To unsubscribe from this group and all its topics, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch%2Bunsubscribe@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:** ![Fadel\_Chafai\_2](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@Fadel\_Chafai\_2](https://discuss.elastic.co/u/Fadel_Chafai_2)\
**Post date:** [May 8, 2013, 9:28am UTC](https://discuss.elastic.co/t/-source-disabled/11874/6 "2013-05-08T09:28:46Z")

</div>

I already asked about the relation between the size of my index and the  
size of my server RAM, and since I have not had any response. I tried to  
disactiver \_source to optimizes the size of my index.

the size of my index (\_source = enable) 9 gb  
Serverr RAM = 16G  
Elasticsearch HEAP SIZE = 8G

thank you

On Wed, May 8, 2013 at 10:24 AM, Rafał Kuć [r.kuc@solr.pl](mailto:r.kuc@solr.pl) wrote:

> Hello!
> 
> For example like this:
> 
> {  
> "mappings": {  
> "properties": {  
> "name": {"type":"string", "store":"yes" }
> 
> }  
> }  
> }  
> }
> 
> _--  
> Regards,  
> Rafał Kuć  
> Sematext :: \*  
> [http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch - Elasticsearch
> 
> - 
> 
> how i can do that ?
> 
> On Wed, May 8, 2013 at 10:15 AM, Rafał Kuć [r.kuc@solr.pl](mailto:r.kuc@solr.pl) wrote:  
> Hello!
> 
> If you disable the \_source field you need to have the contents of the  
> fields stored in order to retrieve them.
> 
> \*--  
> Regards,  
> Rafał Kuć  
> Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> Elasticsearch
> 
> - 
> 
> hi
> 
> how i can get result ( fields ) if \_source field is disabled ??
> 
> ## thank you
> 
> 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 a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US)  
> .  
> To unsubscribe from this group and all its topics, 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 a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US)  
> .  
> To unsubscribe from this group and all its topics, 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:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [May 8, 2013, 11:31pm UTC](https://discuss.elastic.co/t/-source-disabled/11874/7 "2013-05-08T23:31:28Z")

</div>

I have not seen your original question, but since source can be compressed,  
you might get more index size benefits if you remove indexed fields and not  
stored fields.

--  
Ivan

On Wed, May 8, 2013 at 2:28 AM, Fadel Chafai [fadelchafai@gmail.com](mailto:fadelchafai@gmail.com) wrote:

> I already asked about the relation between the size of my index and the  
> size of my server RAM, and since I have not had any response. I tried to  
> disactiver \_source to optimizes the size of my index.
> 
> the size of my index (\_source = enable) 9 gb  
> Serverr RAM = 16G  
> Elasticsearch HEAP SIZE = 8G
> 
> thank you
> 
> On Wed, May 8, 2013 at 10:24 AM, Rafał Kuć [r.kuc@solr.pl](mailto:r.kuc@solr.pl) wrote:
> 
> > Hello!
> > 
> > For example like this:
> > 
> > {  
> > "mappings": {  
> > "properties": {  
> > "name": {"type":"string", "store":"yes" }
> > 
> > }  
> > }  
> > }  
> > }
> > 
> > _--  
> > Regards,  
> > Rafał Kuć  
> > Sematext :: \*  
> > [http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch - Elasticsearch
> > 
> > - 
> > 
> > how i can do that ?
> > 
> > On Wed, May 8, 2013 at 10:15 AM, Rafał Kuć [r.kuc@solr.pl](mailto:r.kuc@solr.pl) wrote:  
> > Hello!
> > 
> > If you disable the \_source field you need to have the contents of the  
> > fields stored in order to retrieve them.
> > 
> > \*--  
> > Regards,  
> > Rafał Kuć  
> > Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> > Elasticsearch
> > 
> > - 
> > 
> > hi
> > 
> > how i can get result ( fields ) if \_source field is disabled ??
> > 
> > ## thank you
> > 
> > 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 a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US)  
> > .  
> > To unsubscribe from this group and all its topics, 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 a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US)  
> > .  
> > To unsubscribe from this group and all its topics, 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:** ![vinod\_eligeti](https://avatars.discourse-cdn.com/v4/letter/v/c4cdca/32.png) [@vinod\_eligeti](https://discuss.elastic.co/u/vinod_eligeti)\
**Post date:** [May 8, 2013, 11:56pm UTC](https://discuss.elastic.co/t/-source-disabled/11874/8 "2013-05-08T23:56:19Z")

</div>

David,

I am also pondering in some of the implementation of setting "store" value  
for a field, if one sets the store value to "no" for a field and also  
\_source for a type is disabled. What is the purpose of that field other  
than querying/indexing? Can you explain real world use case?

thanks

On Wednesday, May 8, 2013 2:17:47 AM UTC-7, David Pilato wrote:

> For fields you want to retrieve, set store to true in mapping.
> 
> That said, why do you need to disable source?
> 
> HTH  
> David
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 8 mai 2013 à 11:12, Fadel Chafai \<[fadelm...@gmail.com](mailto:fadelm...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> hi
> 
> how i can get result ( fields ) if \_source field is disabled ??
> 
> thank you
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> 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:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 9, 2013, 2:25am UTC](https://discuss.elastic.co/t/-source-disabled/11874/9 "2013-05-09T02:25:48Z")

</div>

Some features that come to me:

- Reindexing from Elasticsearch itself.
- Debugging (what was the source when I indexed?).
- Showing results to user. If you did not store the field, you will have to reindex everything.

IMHO, you should disable source only if you really need to disable it (real hard disk constraint, very very big source docs...).

## My 2 cents

David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 9 mai 2013 à 01:56, vinod eligeti [veligeti999@gmail.com](mailto:veligeti999@gmail.com) a écrit :

David,

I am also pondering in some of the implementation of setting "store" value for a field, if one sets the store value to "no" for a field and also \_source for a type is disabled. What is the purpose of that field other than querying/indexing? Can you explain real world use case?

thanks

On Wednesday, May 8, 2013 2:17:47 AM UTC-7, David Pilato wrote:

> For fields you want to retrieve, set store to true in mapping.
> 
> That said, why do you need to disable source?
> 
> HTH  
> David
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 8 mai 2013 à 11:12, Fadel Chafai [fadelm...@gmail.com](mailto:fadelm...@gmail.com) a écrit :
> 
> > hi
> > 
> > how i can get result ( fields ) if \_source field is disabled ??
> > 
> > ## thank you
> > 
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@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:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [May 9, 2013, 3:55am UTC](https://discuss.elastic.co/t/-source-disabled/11874/10 "2013-05-09T03:55:20Z")

</div>

Historically, Lucene has no concept of source. A field is either indexed,  
stored or both (neither does not make sense). Indexed fields can be  
queried/filtered-in and stored fields can be returned as the result  
document. So to answer your question, if the source is disabled and a field  
is not stored, then it either should be indexed or simply ignored.

Elasticsearch introduced the concept of source. The biggest issue with  
stored fields is that each field required a read from the index. With  
source, only one read is required, although the result is much bigger. If  
you need only a handful of fields, then storing and retrieving those fields  
is probably more efficient, but you required many fields or all of them,  
getting the source is more efficient.

--

Ivan

On Wed, May 8, 2013 at 4:56 PM, vinod eligeti [veligeti999@gmail.com](mailto:veligeti999@gmail.com) wrote:

> David,
> 
> I am also pondering in some of the implementation of setting "store" value  
> for a field, if one sets the store value to "no" for a field and also  
> \_source for a type is disabled. What is the purpose of that field other  
> than querying/indexing? Can you explain real world use case?
> 
> thanks
> 
> On Wednesday, May 8, 2013 2:17:47 AM UTC-7, David Pilato wrote:
> 
> > For fields you want to retrieve, set store to true in mapping.
> > 
> > That said, why do you need to disable source?
> > 
> > HTH  
> > David
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 8 mai 2013 à 11:12, Fadel Chafai [fadelm...@gmail.com](mailto:fadelm...@gmail.com) a écrit :
> > 
> > hi
> > 
> > how i can get result ( fields ) if \_source field is disabled ??
> > 
> > thank you
> > 
> > --  
> > 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 elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > 
> > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[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:** ![vinod\_eligeti](https://avatars.discourse-cdn.com/v4/letter/v/c4cdca/32.png) [@vinod\_eligeti](https://discuss.elastic.co/u/vinod_eligeti)\
**Post date:** [May 9, 2013, 5:36pm UTC](https://discuss.elastic.co/t/-source-disabled/11874/11 "2013-05-09T17:36:29Z")

</div>

Thanks David and Ivan for the explanation. I guess it make sense to store  
\_source since the log messages which I store are not huge.

On Wed, May 8, 2013 at 8:55 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> Historically, Lucene has no concept of source. A field is either indexed,  
> stored or both (neither does not make sense). Indexed fields can be  
> queried/filtered-in and stored fields can be returned as the result  
> document. So to answer your question, if the source is disabled and a field  
> is not stored, then it either should be indexed or simply ignored.
> 
> Elasticsearch introduced the concept of source. The biggest issue with  
> stored fields is that each field required a read from the index. With  
> source, only one read is required, although the result is much bigger. If  
> you need only a handful of fields, then storing and retrieving those fields  
> is probably more efficient, but you required many fields or all of them,  
> getting the source is more efficient.
> 
> --
> 
> Ivan
> 
> On Wed, May 8, 2013 at 4:56 PM, vinod eligeti [veligeti999@gmail.com](mailto:veligeti999@gmail.com)wrote:
> 
> > David,
> > 
> > I am also pondering in some of the implementation of setting "store"  
> > value for a field, if one sets the store value to "no" for a field and also  
> > \_source for a type is disabled. What is the purpose of that field other  
> > than querying/indexing? Can you explain real world use case?
> > 
> > thanks
> > 
> > On Wednesday, May 8, 2013 2:17:47 AM UTC-7, David Pilato wrote:
> > 
> > > For fields you want to retrieve, set store to true in mapping.
> > > 
> > > That said, why do you need to disable source?
> > > 
> > > HTH  
> > > David
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 8 mai 2013 à 11:12, Fadel Chafai [fadelm...@gmail.com](mailto:fadelm...@gmail.com) a écrit :
> > > 
> > > hi
> > > 
> > > how i can get result ( fields ) if \_source field is disabled ??
> > > 
> > > thank you
> > > 
> > > --  
> > > 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 elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[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 a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/3yU-n-aLeuw/unsubscribe?hl=en-US)  
> .  
> To unsubscribe from this group and all its topics, 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:37am UTC](https://discuss.elastic.co/t/-source-disabled/11874/12 "2017-07-06T02:37:18Z")

</div>


