我已经创建了一个索引,它包含来自我的MySQL
数据库的数据。我的表中有几个字段,我string
需要它们作为.integer
double
Elasticsearch
所以我知道我可以通过mapping
以下方式做到这一点:
{
"mappings": {
"my_type": {
"properties": {
"userid": {
"type": "text",
"fielddata": true
},
"responsecode": {
"type": "integer"
},
"chargeamount": {
"type": "double"
}
}
}
}
}
但是当我将索引创建为新索引时,我已经尝试过了。我想知道的是如何使用as更新现有字段(即:chargeamount
在这种情况下)?mapping
PUT
这可能吗?任何帮助都将不胜感激。