Updating existing field mapping to multi_field fails

I have an index with an existing field:

curl -XPUT "http://dm-adsearchd102:9201/bia/bia/_mapping" -d '{"bia" :
{ "properties" : {"title" : {"type" : "string","analyzer" :
"my_tokenizer","omit_norms" : true}}}}}'

When I change this field to be a multi_field, I get an error, but the
docs lead me to believe I should be able to do this. Suggestions?

curl -XPUT "http://dm-adsearchd102:9201/bia/bia/_mapping" -d '{"bia" :
{ "properties" : { "title" : {"type" : "multi_field","fields" :
{"title" : {"type" : "string","analyzer" :
"my_tokenizer","omit_norms" : true},"sortable" : {"type" :
"string","analyzer" : "sortable_tokenizer","omit_norms" : true}}}}}}'

"error":"Merge failed with failures {[Can't merge a non multi_field
mapping [title] with a multi_field mapping [title]]}"

Thanks,

David

Hi,

Yep, thats a bug:
Mapper: Upgrading a simple mapping to multi_field mapping fails on merge conflicts · Issue #369 · elastic/elasticsearch · GitHub. Pushed a fix
for it. For now, you can set the ignore_conflicts flag to true and it will
work correctly (though its really not a conflict).

-shay.banon

On Mon, Sep 13, 2010 at 6:44 PM, dbenson dbenson@dbenson.net wrote:

I have an index with an existing field:

curl -XPUT "http://dm-adsearchd102:9201/bia/bia/_mapping" -d '{"bia" :
{ "properties" : {"title" : {"type" : "string","analyzer" :
"my_tokenizer","omit_norms" : true}}}}}'

When I change this field to be a multi_field, I get an error, but the
docs lead me to believe I should be able to do this. Suggestions?

curl -XPUT "http://dm-adsearchd102:9201/bia/bia/_mapping" -d '{"bia" :
{ "properties" : { "title" : {"type" : "multi_field","fields" :
{"title" : {"type" : "string","analyzer" :
"my_tokenizer","omit_norms" : true},"sortable" : {"type" :
"string","analyzer" : "sortable_tokenizer","omit_norms" : true}}}}}}'

"error":"Merge failed with failures {[Can't merge a non multi_field
mapping [title] with a multi_field mapping [title]]}"

Thanks,

David

Awesome, thanks for the quick fix.

Is it safe to assume that ignore_conflicts = true is a temporary
workaround?

Best Regards,
Paul

On Sep 13, 4:12 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Hi,

Yep, thats a bug:Mapper: Upgrading a simple mapping to multi_field mapping fails on merge conflicts · Issue #369 · elastic/elasticsearch · GitHub. Pushed a fix
for it. For now, you can set the ignore_conflicts flag to true and it will
work correctly (though its really not a conflict).

-shay.banon

On Mon, Sep 13, 2010 at 6:44 PM, dbenson dben...@dbenson.net wrote:

I have an index with an existing field:

curl -XPUT "http://dm-adsearchd102:9201/bia/bia/_mapping" -d '{"bia" :
{ "properties" : {"title" : {"type" : "string","analyzer" :
"my_tokenizer","omit_norms" : true}}}}}'

When I change this field to be a multi_field, I get an error, but the
docs lead me to believe I should be able to do this. Suggestions?

curl -XPUT "http://dm-adsearchd102:9201/bia/bia/_mapping" -d '{"bia" :
{ "properties" : { "title" : {"type" : "multi_field","fields" :
{"title" : {"type" : "string","analyzer" :
"my_tokenizer","omit_norms" : true},"sortable" : {"type" :
"string","analyzer" : "sortable_tokenizer","omit_norms" : true}}}}}}'

"error":"Merge failed with failures {[Can't merge a non multi_field
mapping [title] with a multi_field mapping [title]]}"

Thanks,

David

Yep. In 0.10 I have improved the merge conflict resolution a lot, so most
times, if there is a conflict, then its because there is actually one (well,
except for that bug... :wink: )

On Tue, Sep 14, 2010 at 1:56 AM, Paul ppearcy@gmail.com wrote:

Awesome, thanks for the quick fix.

Is it safe to assume that ignore_conflicts = true is a temporary
workaround?

Best Regards,
Paul

On Sep 13, 4:12 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Hi,

Yep, thats a bug:
Mapper: Upgrading a simple mapping to multi_field mapping fails on merge conflicts · Issue #369 · elastic/elasticsearch · GitHub. Pushed a
fix
for it. For now, you can set the ignore_conflicts flag to true and it
will
work correctly (though its really not a conflict).

-shay.banon

On Mon, Sep 13, 2010 at 6:44 PM, dbenson dben...@dbenson.net wrote:

I have an index with an existing field:

curl -XPUT "http://dm-adsearchd102:9201/bia/bia/_mapping" -d '{"bia" :
{ "properties" : {"title" : {"type" : "string","analyzer" :
"my_tokenizer","omit_norms" : true}}}}}'

When I change this field to be a multi_field, I get an error, but the
docs lead me to believe I should be able to do this. Suggestions?

curl -XPUT "http://dm-adsearchd102:9201/bia/bia/_mapping" -d '{"bia" :
{ "properties" : { "title" : {"type" : "multi_field","fields" :
{"title" : {"type" : "string","analyzer" :
"my_tokenizer","omit_norms" : true},"sortable" : {"type" :
"string","analyzer" : "sortable_tokenizer","omit_norms" : true}}}}}}'

"error":"Merge failed with failures {[Can't merge a non multi_field
mapping [title] with a multi_field mapping [title]]}"

Thanks,

David

Actually, I think I follow.

The workaround on 0.10.0 is to set ignore_conflicts to true.

With this fix that won't be necessary, correct?

Thanks,
Paul

On Sep 13, 5:56 pm, Paul ppea...@gmail.com wrote:

Awesome, thanks for the quick fix.

Is it safe to assume that ignore_conflicts = true is a temporary
workaround?

Best Regards,
Paul

On Sep 13, 4:12 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Hi,

Yep, thats a bug:Mapper: Upgrading a simple mapping to multi_field mapping fails on merge conflicts · Issue #369 · elastic/elasticsearch · GitHub. Pushed a fix
for it. For now, you can set the ignore_conflicts flag to true and it will
work correctly (though its really not a conflict).

-shay.banon

On Mon, Sep 13, 2010 at 6:44 PM, dbenson dben...@dbenson.net wrote:

I have an index with an existing field:

curl -XPUT "http://dm-adsearchd102:9201/bia/bia/_mapping" -d '{"bia" :
{ "properties" : {"title" : {"type" : "string","analyzer" :
"my_tokenizer","omit_norms" : true}}}}}'

When I change this field to be a multi_field, I get an error, but the
docs lead me to believe I should be able to do this. Suggestions?

curl -XPUT "http://dm-adsearchd102:9201/bia/bia/_mapping" -d '{"bia" :
{ "properties" : { "title" : {"type" : "multi_field","fields" :
{"title" : {"type" : "string","analyzer" :
"my_tokenizer","omit_norms" : true},"sortable" : {"type" :
"string","analyzer" : "sortable_tokenizer","omit_norms" : true}}}}}}'

"error":"Merge failed with failures {[Can't merge a non multi_field
mapping [title] with a multi_field mapping [title]]}"

Thanks,

David

Yep.

On Tue, Sep 14, 2010 at 2:01 AM, Paul ppearcy@gmail.com wrote:

Actually, I think I follow.

The workaround on 0.10.0 is to set ignore_conflicts to true.

With this fix that won't be necessary, correct?

Thanks,
Paul

On Sep 13, 5:56 pm, Paul ppea...@gmail.com wrote:

Awesome, thanks for the quick fix.

Is it safe to assume that ignore_conflicts = true is a temporary
workaround?

Best Regards,
Paul

On Sep 13, 4:12 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Hi,

Yep, thats a bug:
Mapper: Upgrading a simple mapping to multi_field mapping fails on merge conflicts · Issue #369 · elastic/elasticsearch · GitHub. Pushed a
fix
for it. For now, you can set the ignore_conflicts flag to true and it
will
work correctly (though its really not a conflict).

-shay.banon

On Mon, Sep 13, 2010 at 6:44 PM, dbenson dben...@dbenson.net wrote:

I have an index with an existing field:

curl -XPUT "http://dm-adsearchd102:9201/bia/bia/_mapping" -d '{"bia"
:
{ "properties" : {"title" : {"type" : "string","analyzer" :
"my_tokenizer","omit_norms" : true}}}}}'

When I change this field to be a multi_field, I get an error, but the
docs lead me to believe I should be able to do this. Suggestions?

curl -XPUT "http://dm-adsearchd102:9201/bia/bia/_mapping" -d '{"bia"
:
{ "properties" : { "title" : {"type" : "multi_field","fields" :
{"title" : {"type" : "string","analyzer" :
"my_tokenizer","omit_norms" : true},"sortable" : {"type" :
"string","analyzer" : "sortable_tokenizer","omit_norms" : true}}}}}}'

"error":"Merge failed with failures {[Can't merge a non multi_field
mapping [title] with a multi_field mapping [title]]}"

Thanks,

David