Create default mapping through the API


(jurg) #1

Hi all,

I am trying to create a default mapping like this

curl -XPUT 'http://localhost/heystaq-development-trending' -d '
{
"mappings": {
"default" : {
"_timestamp" : { "enabled" : true, "store" : true },
"dynamic_templates" : [
{
"whitespace" : {
"match" : "*",
"match_mapping_type" : "string",
"mapping" : { "type" : "string", "analyzer" :
"whitespace" }
}
}
]
}
}
}
'

Why doesn't that work? (I end up with a default type in my index, that
was definitely not expected.)

Groet,
Jurg.

--


(system) #2