Updating existing field mapping to multi_field fails


(dbenson) #1

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


(Shay Banon) #2

Hi,

Yep, thats a bug:
http://github.com/elasticsearch/elasticsearch/issues/issue/369. 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


(ppearcy) #3

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:http://github.com/elasticsearch/elasticsearch/issues/issue/369. 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


(Shay Banon) #4

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:
http://github.com/elasticsearch/elasticsearch/issues/issue/369. 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


(ppearcy) #5

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:http://github.com/elasticsearch/elasticsearch/issues/issue/369. 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


(Shay Banon) #6

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:
http://github.com/elasticsearch/elasticsearch/issues/issue/369. 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


(system) #7