【问题标题】:kibana keyword occurrency across documents跨文档的 kibana 关键字出现
【发布时间】:2019-02-22 02:25:10
【问题描述】:

我无法在 kibana 中的 full_text 字段内显示单词的出现,该字段在索引中的文档中映射为 "type": "keyword"
我的第一次尝试涉及使用分析仪。但是我无法以任何方式更改文档,索引映射反映分析器,但没有字段反映分析。
这是简化的映射:

{
  "mappings": {
    "doc": {
      "properties": {
        "text": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            },
            "analyzed": {
              "type": "text",
              "analyzer": "rebuilt"
            }
          }
        }
      }
    }
  },
  "settings": {
    "analysis": {
      "analyzer": {
        "rebuilt": {
          "tokenizer": "standard"
        }
      }
    },
    "index.mapping.ignore_malformed": true,
    "index.mapping.total_fields.limit": 2000
  }
}

但我仍然无法看到我希望保存在 text.analyzed 字段下的单词数组,确实该字段不存在,我想知道为什么

【问题讨论】:

    标签: elasticsearch kibana elasticsearch-aggregation


    【解决方案1】:

    似乎设置fielddata=truelink,尽管非常气馁,解决了我的问题(至少现在),并允许我在 kibana 中可视化每个单词的出现(或绝对频率) text 跨文档的字段。
    因此,提议的简化映射的最终版本变为:

    {
      "mappings": {
        "doc": {
          "properties": {
            "text": {
              "type": "text",
              "analyzer": "rebuilt",
              "fielddata": true
              "fields": {
                "keyword": {
                  "type": "keyword"
                } 
              }
            }
          }
        }
      },
      "settings": {
        "analysis": {
          "analyzer": {
            "rebuilt": {
              "tokenizer": "standard"
            }
          }
        },
        "index.mapping.ignore_malformed": true,
        "index.mapping.total_fields.limit": 2000
      }
    }
    

    摆脱无用的analyzed 字段。
    我仍然需要检查 kibana 的性能。如果有人对此问题有性能安全的解决方案,请不要犹豫。
    谢谢。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多