Default parent/child mapping strange behavior

I have the following default-mapping.json, which specifies foo as the child
of bar:

{
"foo" : {
"_parent" : {
"type" : "bar"
},
"_routing" : {
"required" : true
}
}
}

Starting with a fresh index, I index an object of a new, totally unrelated
type:

curl -X PUT localhost:9200/test/qux/1 -d '{
"name" : "Bill"
}'

If I then look at the auto-created mapping,

curl localhost:9200/test/_mapping?pretty=true

I see this:

{
"test" : {
"qux" : {
"_parent" : {
"type" : "bar"
},
"_routing" : {
"required" : true
},
"properties" : {
"name" : {
"type" : "string"
}
}
}
}
}

Why is this happening? Besides simply being wrong it's breaking updates to
qux objects because routing is required. Is my default-mapping.json defined
incorrectly?

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

Hey,

the default-mapping.json is always applied, regardless of the type. Maybe
you are better off with index templates?

--Alex

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