Changing mapping for existing data


(Marcin Dojwa) #1

Hi,

I have a problem with changing mapping of specified field. the field has
"index":"no" and I want to change it to "index":"analyzed". Putting new
mapping throws error. What should I do to apply new mapping for existing
data?

Best regards.


(Marcin Dojwa) #2

Sorry for mistake, I meant the other way, I want to change
from "index":"analyzed" to "index":"no" and add "include_in_all":false and
"store":"yes" :slight_smile:

2012/4/3 Marcin Dojwa m.dojwa@livechatinc.com

Hi,

I have a problem with changing mapping of specified field. the field has
"index":"no" and I want to change it to "index":"analyzed". Putting new
mapping throws error. What should I do to apply new mapping for existing
data?

Best regards.


(Marcin Dojwa) #3

Summarizing, I want to do both ways :). I would really appreciate your help.

Thanks.

2012/4/3 Marcin Dojwa m.dojwa@livechatinc.com

Sorry for mistake, I meant the other way, I want to change
from "index":"analyzed" to "index":"no" and add "include_in_all":false and
"store":"yes" :slight_smile:

2012/4/3 Marcin Dojwa m.dojwa@livechatinc.com

Hi,

I have a problem with changing mapping of specified field. the field has
"index":"no" and I want to change it to "index":"analyzed". Putting new
mapping throws error. What should I do to apply new mapping for existing
data?

Best regards.


(David Pilato) #4

I'm afraid you have to clean your existing datas.
IMHO, you can merge mappings on new fields but you can't change "core"
mappings for existing datas.

David.

Le 3 avril 2012 à 16:49, Marcin Dojwa m.dojwa@livechatinc.com a écrit :

:). I would really appreciate your help.

Thanks.

2012/4/3 Marcin Dojwa < m.dojwa@livechatinc.com
mailto:m.dojwa@livechatinc.com >

way, I want to change from "index":"analyzed" to "index":"no" and add
"include_in_all":false and "store":"yes" :slight_smile:

2012/4/3 Marcin Dojwa < m.dojwa@livechatinc.com
mailto:m.dojwa@livechatinc.com >

I have a problem with changing mapping of specified field. the field has
"index":"no" and I want to change it to "index":"analyzed". Putting new
mapping throws error. What should I do to apply new mapping for existing
data?

Best regards.

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet


(Shay Banon) #5

Yea, you can't change an existing mapping "index" mapping, because it
requires reindexing the data. You need to do it yourself (the reindexing
part) into a fresh index with the updated mapping.

On Tue, Apr 3, 2012 at 6:04 PM, david@pilato.fr david@pilato.fr wrote:

**

I'm afraid you have to clean your existing datas.

IMHO, you can merge mappings on new fields but you can't change "core"
mappings for existing datas.

David.

Le 3 avril 2012 à 16:49, Marcin Dojwa m.dojwa@livechatinc.com a écrit :

Summarizing, I want to do both ways :). I would really appreciate your
help.

Thanks.

2012/4/3 Marcin Dojwa < m.dojwa@livechatinc.com >

Sorry for mistake, I meant the other way, I want to change
from "index":"analyzed" to "index":"no" and add "include_in_all":false and
"store":"yes" :slight_smile:

2012/4/3 Marcin Dojwa < m.dojwa@livechatinc.com >

Hi,

I have a problem with changing mapping of specified field. the field has
"index":"no" and I want to change it to "index":"analyzed". Putting new
mapping throws error. What should I do to apply new mapping for existing
data?

Best regards.

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet


(Michael Sick) #6

Using index aliasing is a big help for changes like this as the new index
can be created and then the alias changed when all is done. (+2c)

On Sat, Apr 7, 2012 at 11:35 AM, Shay Banon kimchy@gmail.com wrote:

Yea, you can't change an existing mapping "index" mapping, because it
requires reindexing the data. You need to do it yourself (the reindexing
part) into a fresh index with the updated mapping.

On Tue, Apr 3, 2012 at 6:04 PM, david@pilato.fr david@pilato.fr wrote:

**

I'm afraid you have to clean your existing datas.

IMHO, you can merge mappings on new fields but you can't change "core"
mappings for existing datas.

David.

Le 3 avril 2012 à 16:49, Marcin Dojwa m.dojwa@livechatinc.com a
écrit :

Summarizing, I want to do both ways :). I would really appreciate your
help.

Thanks.

2012/4/3 Marcin Dojwa < m.dojwa@livechatinc.com >

Sorry for mistake, I meant the other way, I want to change
from "index":"analyzed" to "index":"no" and add "include_in_all":false and
"store":"yes" :slight_smile:

2012/4/3 Marcin Dojwa < m.dojwa@livechatinc.com >

Hi,

I have a problem with changing mapping of specified field. the field has
"index":"no" and I want to change it to "index":"analyzed". Putting new
mapping throws error. What should I do to apply new mapping for existing
data?

Best regards.

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet


(system) #7