我的文档中有 3 个 JSON 键值对,我将它们插入到 elasticsearch 中并使用 Kibana4 进行可视化。这 3 个 JSON 键是NT
,XT
和YT
. 对于所有三个键,这些值通常是介于 100 和 1000 之间的整数。一些典型值为543
和。当我可视化 Kibana4 中的键时,对于上述三个键中的每一个,我都会收到以下警告。328
753
This is an analyzed string field.Analyzed string fields are highly unique and can use a lot of memory to visualize
为了解决上述问题,我使用下面的 shell 脚本为document type
包含这些键的弹性搜索创建映射。
我的弹性搜索索引是bits
,我的文档类型是nts
,我正在尝试为类型long
文档中的 3 个 JSON 键分配类型,nts
即NT
,XT
和YT
.
#!/bin/bash
curl -XPUT 'http://localhost:9200/bits/nts/_mapping' -d '
{
"events" : {
"dynamic" : "strict",
"properties" : {
"NT" : {
type : "long"
},
"XT" : {
type : "long"
},
"YT" : {
type : "long"
}
}
},
}'
上面的映射不能解决问题,我仍然收到analyzed string field
警告。有人可以指出可能出了什么问题吗?