Update_all_type not working


(Patrick) #1

Hi,

I am using ElasticSearch and Kibana 5.0.0-alpha5.

I have a "logevent" type which contains a "level" field. I want to update the field's "fielddata" to true. I tried the following statement

PUT */_mapping/logevent
{
"logevent": {
"properties": {
"level": {
"type": "string",
"fielddata": true
}
}
}
}

However I got the following error

{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Mapper for [level] conflicts with existing mapping in other types:\n[mapper [level] has different [norms] values, cannot change from disable to enabled]"
}
],
"type": "illegal_argument_exception",
"reason": "Mapper for [level] conflicts with existing mapping in other types:\n[mapper [level] has different [norms] values, cannot change from disable to enabled]"
},
"status": 400
}

So I tried using update_all_type (see below) as discussed here https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html but I got the exact same error. Does anyone know what I am doing wrong?

PUT */_mapping/logevent?update_all_type
{
"properties": {
"level": {
"type": "string",
"fielddata": true
}
}
}


(Patrick) #2

If anyone has any thoughts it would be greatly appreciated


(Mark Walkom) #3

You will need to reindex to change this one.


(Patrick) #4

Hi Mark thanks for the reply.

I'm new to ES so would you mind providing a bit more context?

Why does update_all_type not work?

If I reindex am I still required to run update_all_type?

I would assume this would be a problem for anyone new to ES and Kibana and running Elastic Stack 5.0.0-beta1 so I'm surprised there isn't better help in the getting started documentation for this issue.


(Mark Walkom) #5

What does the existing mapping look like? Did you disable norms or fielddata?


(Patrick) #6

Hi Mark.

As in my original post I'm trying to set fielddata to true. From what is discussed in the following post it seems like it should have solved my issue but it fails

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html

I'm just new to ElasticSearch so if there is some other piece of information you need please just let me know.

Thanks heaps for your assistance.


(Mark Walkom) #7

The OP doesn't contain what it looks like right now, before any mapping updates, only what you are trying to do :slight_smile:


(system) #8