2015-04-07 62 views
0

我在我的文档中有3个JSON键值对,我插入elasticsearch并使用Kibana4进行可视化。3个JSON键是NT,XTYT。所有三个键的值通常在100到1000之间。一些典型值是543328753。当我看到Kibana4中的按键时,我得到以上三个按键中的每一个的警告。Kibana4:分析字符串字段警告

This is an analyzed string field.Analyzed string fields are highly unique and can use a lot of memory to visualize

在试图解决上述问题我已经使用了以下外壳脚本来创建在包含这些键弹性搜索该document type的映射。

我elasticsearch指数bits和我的文档类型为nts,我想类型ntsNTXTYT的文件中指定类型long 3个JSON键。

#!/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警告。有人能指出什么可能是错的吗?

回答

3

确保您的字段实际上通过检查Kibana中Discover选项卡上的单个索引文档JSON获取索引为整数(即​​数字周围没有引号)。

您可能需要更改应用程序索引数据的方式。 index.mapping.ignore_malformed和index.mapping.coerce设置here也可能有所帮助。

也尝试去设置 - >指数 - >然后单击Kibana中的“重新加载字段列表”按钮,因为它缓存字段类型。

最后,如果你使用时间戳的指数模式(如[logstash-] YYYY.MM.DD),你可能需要重命名或删除旧索引您的字段建立索引字符串