我到底想做什么?
将doc_type添加到现有索引中。
我试过什么?
创建索引和文档
POST /my_index-1/my_type/1
{
"my_prop": "my_value"
}添加了一个模板
PUT /_template/my_template
{
"id": "my_template",
"template": "my_index-*",
"mappings": {
"_default_": {
"dynamic_templates": [
{
"my_prop_template": {
"mapping": {
"index": "not_analyzed",
"doc_values": true,
"fielddata": {
"format": "doc_values"
},
"type": "string"
},
"match": "my_prop",
"match_mapping_type": "string"
}
}
]
}
}
}重新编制索引
./stream2es es --source http://localhost:9200/my_index-1 --target http://localhost:9200/my_index-2哪里出了问题?
在新索引my_index-2中,属性没有接收到"doc_values": true。
...
"properties": {
"my_prop": {
"type": "string"
}
}
..."doc_values": true。我的问题
如何用"doc_values": true重新编制旧索引
发布于 2015-06-15 11:51:51
谢谢@Val!洛格斯塔什确实解决了这个问题。
stream2es和elasticsearch重新索引都创建了没有“doc_values”的新映射: true。
https://stackoverflow.com/questions/30829603
复制相似问题