2016-11-26 84 views
0

我正在从Facebook图表api使用elasticsearch5 & kibana5基于Facebook的意见仪表板工作。我添加了一些分析字段,它们出现在Kibana的发现部分,但是当进入可视化时,我没有找到这些字段。Kibana可视化不显示分析字段

我的Facebook评论指数:

PUT fb_comments 
{ 
    "settings": { 
     "analysis": {}, 
     "mapping.ignore_malformed": true 
    }, 
    "mappings": { 
     "fb_comment": { 
      "dynamic_templates": [ 
       { 
        "created_time": { 
         "match": "created_time", 
         "mapping": { 
          "type": "date", 
          "format": "epoch_second" 
         } 
        } 
       }, 
       { 
        "message": { 
         "match": "message", 
         "mapping": { 
          "type": "string", 
          "analyzer": "simple" 
         } 
        } 
       }, 
       { 
        "strings": { 
         "match_mapping_type": "string", 
         "mapping": { 
          "type": "string", 
          "index": "not_analyzed" 
         } 
        } 
       } 
      ] 
     } 
    } 
} 

The field message the analyzed one is appearing in discover The field message the analyzed one is not appearing in visualization part

+0

嗨,我不确定,但在弹性5型“字符串”更改为“关键字”,如果不分析和“文本”,如果分析https://www.elastic.co/guide/en/elasticsearch/reference/电流/ text.html 尝试改变映射到: { “字符串”:{ “match_mapping_type”: “串”, “映射”:{ “类型”: “关键字” } } } – Lax

回答

0

我终于找到了解决方案。 所以在elasticsearch 4.X我们有字符串类型然后你指定类型的分析仪如果你想分析。在elasticsearch 5.X我们有两种类型的关键字这是自动汇总并没有分析,第二个是文本这是autmatically 分析,并没有聚集。解决方案是,如果你想要一个分析字段,并在同一时间聚合你应该添加一个属性“fielddata”:真,它将被分析和聚合。

0

我认为这可能与内存限制。根据Kibana 5的帮助,分析的字段可能需要更多的记忆。

我检查了我的记忆,它确实在最大容量下使用。

+0

其实我没有,所以我停止使用分析领域没有找出任何解决方案,你是对的我已经面临内存问题,elasticsearch是不稳定的。 –

+0

如果我找到任何东西,我会告诉你。我宁愿不必停止使用分析字段.. – Krylancelo