# \_all field mapping

**URL:** <https://discuss.elastic.co/t/-all-field-mapping/11055>\
**Category:** Elasticsearch\
**Created:** [March 7, 2013, 1:36pm UTC](https://discuss.elastic.co/t/-all-field-mapping/11055 "2013-03-07T13:36:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrej](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Andrej](https://discuss.elastic.co/u/Andrej)\
**Post date:** [March 7, 2013, 1:36pm UTC](https://discuss.elastic.co/t/-all-field-mapping/11055/1 "2013-03-07T13:36:20Z")

</div>

Hi,

a probably pretty simple to answer question: I can declare values for the  
\_all field in the mapping of an index. But when I get the mapping using  
curl and the get mapping endpoint I am not getting any information about  
this field. Is there a simple way to retrieve complete mapping data  
(including the defaults maybe?) or how can I check if these mappings are  
applied correctly?

Thanks!  
Andrej

--  
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:** [March 7, 2013, 9:41pm UTC](https://discuss.elastic.co/t/-all-field-mapping/11055/2 "2013-03-07T21:41:31Z")

</div>

The \_all field is not stored by default, only indexed, and will not be part  
of the source. Enable store on the \_all field and extract the value from  
the fields, not the source.

--  
Ivan

On Thu, Mar 7, 2013 at 5:36 AM, Andrej Rosenheinrich \<  
[andrej.rosenheinrich@unister.de](mailto:andrej.rosenheinrich@unister.de)\> wrote:

> Hi,
> 
> a probably pretty simple to answer question: I can declare values for the  
> \_all field in the mapping of an index. But when I get the mapping using  
> curl and the get mapping endpoint I am not getting any information about  
> this field. Is there a simple way to retrieve complete mapping data  
> (including the defaults maybe?) or how can I check if these mappings are  
> applied correctly?
> 
> Thanks!  
> Andrej
> 
> --  
> 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:** ![Andrej](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Andrej](https://discuss.elastic.co/u/Andrej)\
**Post date:** [March 8, 2013, 9:16am UTC](https://discuss.elastic.co/t/-all-field-mapping/11055/3 "2013-03-08T09:16:17Z")

</div>

Hi Ivan,

maybe my question wasnt well asked, I'll try again. I know that \_all field  
is not stored by default, but I can declare stuff for it in the mapping to  
control its behavior/values (e.g. simply disable it, it is enabled by  
default). But I dont know how to retrieve this setting/mapping value that  
it is enabled or disabled, because there is no information about it in the  
mapping I get using the get api. So my question is, how can I figure out on  
an index if \_all is enabled/disabled or whatever other settings are used  
(e.g. do I have to look at all fields if the are included/excluded or is  
there a collection somewhere where I can get this information).

Thanks!  
Andrej

--  
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 8, 2013, 12:53pm UTC](https://discuss.elastic.co/t/-all-field-mapping/11055/4 "2013-03-08T12:53:01Z")

</div>

If there is nothing in the mapping you retrieve, then it is using the  
default settings. If you set anything different from the default, it will  
be reflected in the mapping:

curl -XPUT '[http://127.0.0.1:9200/test/?pretty=1](http://127.0.0.1:9200/test/?pretty=1)' -d '  
{  
"mappings" : {  
"test" : {  
"\_all" : {  
"store" : "yes"  
}  
}  
}  
}  
'

# {

# "ok" : true,

# "acknowledged" : true

# }

curl -XGET '[http://127.0.0.1:9200/test/test/\_mapping?pretty=1](http://127.0.0.1:9200/test/test/_mapping?pretty=1)'

# {

# "test" : {

# "\_all" : {

# "store" : true

# },

# "properties" : {}

# }

# }

On Fri, Mar 8, 2013 at 10:16 AM, Andrej Rosenheinrich \<  
[andrej.rosenheinrich@unister.de](mailto:andrej.rosenheinrich@unister.de)\> wrote:

> Hi Ivan,
> 
> maybe my question wasnt well asked, I'll try again. I know that \_all field  
> is not stored by default, but I can declare stuff for it in the mapping to  
> control its behavior/values (e.g. simply disable it, it is enabled by  
> default). But I dont know how to retrieve this setting/mapping value that  
> it is enabled or disabled, because there is no information about it in the  
> mapping I get using the get api. So my question is, how can I figure out on  
> an index if \_all is enabled/disabled or whatever other settings are used  
> (e.g. do I have to look at all fields if the are included/excluded or is  
> there a collection somewhere where I can get this information).
> 
> Thanks!  
> Andrej
> 
> --  
> 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:** ![Andrej](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Andrej](https://discuss.elastic.co/u/Andrej)\
**Post date:** [March 8, 2013, 2:00pm UTC](https://discuss.elastic.co/t/-all-field-mapping/11055/5 "2013-03-08T14:00:45Z")

</div>

Hi Clinton,

you are, of course, right, the problem was a different one, I had a typo in  
the mapping saying "enable" instead of "enabled" (triple checking is not  
necessarily enough ...). Well, here is the next question, as enable doesnt  
make sense for the field, should I get an error or at least a warning from  
mapping parser? My (wrong) conclusion was that when creating an index says  
ok that the mapping is ok.

Thanks!  
Andrej

Am Freitag, 8. März 2013 13:53:01 UTC+1 schrieb Clinton Gormley:

> If there is nothing in the mapping you retrieve, then it is using the  
> default settings. If you set anything different from the default, it will  
> be reflected in the mapping:
> 
> curl -XPUT '[http://127.0.0.1:9200/test/?pretty=1](http://127.0.0.1:9200/test/?pretty=1)' -d '  
> {  
> "mappings" : {  
> "test" : {  
> "\_all" : {  
> "store" : "yes"  
> }  
> }  
> }  
> }  
> '
> 
> # {
> 
> # "ok" : true,
> 
> # "acknowledged" : true
> 
> # }
> 
> curl -XGET '[http://127.0.0.1:9200/test/test/\_mapping?pretty=1](http://127.0.0.1:9200/test/test/_mapping?pretty=1)'
> 
> # {
> 
> # "test" : {
> 
> # "\_all" : {
> 
> # "store" : true
> 
> # },
> 
> # "properties" : {}
> 
> # }
> 
> # }
> 
> On Fri, Mar 8, 2013 at 10:16 AM, Andrej Rosenheinrich \<  
> [andrej.ros...@unister.de](mailto:andrej.ros...@unister.de) \<javascript:\>\> wrote:
> 
> > Hi Ivan,
> > 
> > maybe my question wasnt well asked, I'll try again. I know that \_all  
> > field is not stored by default, but I can declare stuff for it in the  
> > mapping to control its behavior/values (e.g. simply disable it, it is  
> > enabled by default). But I dont know how to retrieve this setting/mapping  
> > value that it is enabled or disabled, because there is no information about  
> > it in the mapping I get using the get api. So my question is, how can I  
> > figure out on an index if \_all is enabled/disabled or whatever other  
> > settings are used (e.g. do I have to look at all fields if the are  
> > included/excluded or is there a collection somewhere where I can get this  
> > information).
> > 
> > Thanks!  
> > Andrej
> > 
> > --  
> > 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:** ![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 8, 2013, 2:02pm UTC](https://discuss.elastic.co/t/-all-field-mapping/11055/6 "2013-03-08T14:02:35Z")

</div>

On Fri, 2013-03-08 at 06:00 -0800, Andrej Rosenheinrich wrote:

> Hi Clinton,
> 
> you are, of course, right, the problem was a different one, I had a  
> typo in the mapping saying "enable" instead of "enabled" (triple  
> checking is not necessarily enough ...). Well, here is the next  
> question, as enable doesnt make sense for the field, should I get an  
> error or at least a warning from mapping parser? My (wrong) conclusion  
> was that when creating an index says ok that the mapping is ok.

Yeah - it tends to ignore stuff it doesn't recognise, instead of  
throwing an error.

clint

> Thanks!  
> Andrej
> 
> Am Freitag, 8. März 2013 13:53:01 UTC+1 schrieb Clinton Gormley:  
> If there is nothing in the mapping you retrieve, then it is  
> using the default settings. If you set anything different from  
> the default, it will be reflected in the mapping:
> 
> ```
> curl -XPUT 'http://127.0.0.1:9200/test/?pretty=1' -d '
> {
> "mappings" : {
> "test" : {
> "_all" : {
> "store" : "yes"
> }
> }
> }
> }
> '
>     
>     
> # {
> # "ok" : true,
> # "acknowledged" : true
> # }
>     
>     
>     
>     
> curl -XGET
> 'http://127.0.0.1:9200/test/test/_mapping?pretty=1' 
>     
>     
> # {
> # "test" : {
> # "_all" : {
> # "store" : true
> # },
> # "properties" : {}
> # }
> # }
>     
>     
>     
>     
>     
>     
>     
>     
>     
>     
> On Fri, Mar 8, 2013 at 10:16 AM, Andrej Rosenheinrich
> <andrej.ros...@unister.de> wrote:
> Hi Ivan,
>             
> maybe my question wasnt well asked, I'll try again. I
> know that _all field is not stored by default, but I
> can declare stuff for it in the mapping to control its
> behavior/values (e.g. simply disable it, it is enabled
> by default). But I dont know how to retrieve this
> setting/mapping value that it is enabled or disabled,
> because there is no information about it in the
> mapping I get using the get api. So my question is,
> how can I figure out on an index if _all is
> enabled/disabled or whatever other settings are used
> (e.g. do I have to look at all fields if the are
> included/excluded or is there a collection somewhere
> where I can get this information).
>             
>             
> Thanks!
> Andrej
> 
> ```

--  
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:** [March 8, 2013, 4:46pm UTC](https://discuss.elastic.co/t/-all-field-mapping/11055/7 "2013-03-08T16:46:48Z")

</div>

My apologies for misreading your question. I tend to pass time at meetings  
by catching up on email. My reading comprehension diminishes when reading  
on small screens. 🙂

--  
Ivan

On Fri, Mar 8, 2013 at 1:16 AM, Andrej Rosenheinrich \<  
[andrej.rosenheinrich@unister.de](mailto:andrej.rosenheinrich@unister.de)\> wrote:

> Hi Ivan,
> 
> maybe my question wasnt well asked, I'll try again. I know that \_all field  
> is not stored by default, but I can declare stuff for it in the mapping to  
> control its behavior/values (e.g. simply disable it, it is enabled by  
> default). But I dont know how to retrieve this setting/mapping value that  
> it is enabled or disabled, because there is no information about it in the  
> mapping I get using the get api. So my question is, how can I figure out on  
> an index if \_all is enabled/disabled or whatever other settings are used  
> (e.g. do I have to look at all fields if the are included/excluded or is  
> there a collection somewhere where I can get this information).
> 
> Thanks!  
> Andrej
> 
> --  
> 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:47am UTC](https://discuss.elastic.co/t/-all-field-mapping/11055/8 "2017-07-06T02:47:28Z")

</div>


