我的本地实例上有一个 River ES 1.3.4 和 JDBC For MySql 1.3.4.4
这条河运行良好,并在 ES 中导入数据。我面临的问题是我的字段之一是文本字段并且其中有空格。例如“实时计算器”。 ES 将其索引为“实时”、“时间”和“计算器”,而不是“实时计算器”。
所以我使用下面提到的 JSON 创建映射:
{
"sale_test": {
"properties": {
"Client": {
"index": "not_analyzed",
"type": "string"
},
"OfferRGU": {
"type": "long"
},
"SaleDate": {
"format": "dateOptionalTime",
"type": "date"
},
"State": {
"type": "string"
}
}
}
}
和命令:
curl -XPUT http://localhost:9200/my_index/_mapping/my_type
但我收到下面提到的错误:
> {"error":"MapperParsingException[Root type mapping not empty after
> parsing! Remaining fields: [sale_test :
> {properties={Client={type=string, index=not_analyzed},
> OfferRGU={type=long}, SaleDate={type=date, format=dateOptionalTime},
> State={type=string}}}]]","status":400}
当我尝试使用下面提到的命令查看当前映射时:
curl -XGET http://localhost:9200/dgses/sale_test_river/_mapping
我只得到这个:{}
感谢您的帮助。