I am having trouble adding a field (named user.privateAttributes
) to an existing _default_
mapping. Instead of adding the new field, it is replacing the entire mapping with a new single-field mapping.
When I run the same call on a regular mapping (for a type, not _default_
), the field is added as I expect, with other fields remaining untouched.
I'm running ES 2.4.1.
My request to add the field is like this:
curl -s -XPUT http://localhost:9200/users/_mapping/_default_ -d'
{
"properties": {
"user": {
"properties": {
"privateAttributes": {
"type": "string",
"fields": {
"untouched": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
}
}'
How can I modify the default mapping to add a new field, leaving the existing fields unchanged?