【问题标题】:Kibana visualization not showing analyzed fieldsKibana 可视化未显示分析的字段
【发布时间】:2017-04-10 13:28:39
【问题描述】:

我正在使用 elasticsearch5 和 kibana5 从 facebook graph api 开发基于 facebook cmets 的仪表板。我添加了一些分析的字段,它们出现在 Kibana 的发现部分,但是在进行可视化时我没有找到这些字段。

我的 facebook cmets 索引:

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

【问题讨论】:

  • 嗨,我不确定,但是在弹性 5 中,如果不分析,则将“字符串”类型更改为“关键字”,如果分析,则更改为“文本”elastic.co/guide/en/elasticsearch/reference/current/text.html 尝试将映射更改为:{“字符串”: { "match_mapping_type": "string", "mapping": { "type": "keyword" } } }

标签: elasticsearch kibana kibana-5


【解决方案1】:

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

我检查了我的记忆,它确实已达到最大容量。

【讨论】:

  • 其实我没有,所以我停止使用分析字段没有找到任何解决方案,你说得对,我已经面临内存问题,elasticsearch 不稳定。
  • 如果我找到任何东西,我会告诉你的。我宁愿不必停止使用分析字段..
【解决方案2】:

我终于找到了解决办法。 因此,在 elasticsearch 4.X 中,我们有 string type,然后如果您希望被分析,您可以指定 type of analyzer。在 elasticsearch 5.X 中,我们有两种类型的 keyword,它们会自动聚合而不分析,第二种是 text > 自动分析而非汇总。解决方案是,如果您想要一个同时分析和聚合的字段,您应该添加一个属性 "fielddata":true,它将被分析和聚合。

【讨论】:

    猜你喜欢
    • 2017-03-14
    • 2021-01-23
    • 2017-01-30
    • 1970-01-01
    • 2019-08-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-15
    相关资源
    最近更新 更多