【发布时间】:2015-06-22 09:16:49
【问题描述】:
让我先解释一下我的情况。 我正在从 RDBMS 获取数据并将其推送到 ElasticSearch。 获取的结果是列表的形式,我正在准备这样的批量索引请求:
BulkRequestBuilder bulkRequest = client.prepareBulk();
for (Map<String,Object> singleDataRow : ResultSet)
{
IndexRequest indexRequest = new IndexRequest("testindex","testtype",singleDataRow.getObject("NAME"));
bulkRequest.add(indexRequest);
}
bulkRequest.execute().actionGet();
My Map = 包括字符串到字符串、字符串到大十进制、字符串到大整数等的映射。 例如。
{ BIRTHDATE : 2015-03-05 , NAME : deepankar , AGE : 22 , AMOUNT : 15.5 }
但是当我在 testindex 中看到我的 testtype 的映射时,所有字段的映射都是 "type" : "string"
为什么字段不映射到 "type": "string" 或 "type" : "long" ,甚至像 elasticsearch 默认那样映射到 "type" : "date"?
【问题讨论】:
标签: elasticsearch