_all field mapping

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.
For more options, visit https://groups.google.com/groups/opt_out.

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> 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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.

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.
For more options, visit https://groups.google.com/groups/opt_out.

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.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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.

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' -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 <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 <javascript:>.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.

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.
For more options, visit https://groups.google.com/groups/opt_out.

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. :slight_smile:

--
Ivan

On Fri, Mar 8, 2013 at 1:16 AM, Andrej Rosenheinrich <
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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.