我正在使用JDBC River加载数据:
curl -XPUT 'localhost:9200/_river/my_jdbc_river/_meta' -d '{
"type": "jdbc",
"jdbc": {
"url": "jdbc:mysql://localhost:3306/test",
"user": "root",
"password": "root",
"sql": "SELECT TAD.ID AS _id, TAD.APP_NAME AS appName FROM TOPIC_APP_DETAILS TAD ",
"index": "app_index",
"type": "app_type",
"mappings": {
"app_type": {
"properties": {
"appName": {
"type": "completion"
}
}
}
}
}
}
当我执行以下查询时, ClassCastException [org.elasticsearch.index.mapper.core.StringFieldMapper无法强制转换为org.elasticsearch.index.mapper.core.CompletionFieldMapper] ;
curl -X POST 'localhost:9200/app_index/_suggest?pretty' -d '{
"app-suggest" : {
"text" : "cri",
"completion" : {
"field" : "appName"
}
}
}
请提出我在这里缺少的内容。