zoukankan      html  css  js  c++  java
  • Kibana创建索引成功,但一直不显示出来(Fielddata is disabled on text fields by default. Set fielddata=true........)

    现象

    把EFK整个集群搭建完成后,通过Kibana操作界面创建索引(如图1),我创建了lile-zabbix*的索引,显示是创建成功了,但是只要我在重新刷新一次,已经创建的索引就“消失了”。后通过查看Kibana与ES的日志,均报错如下

    Caused by: java.lang.IllegalArgumentException: Fielddata is disabled on text fields by default. Set fielddata=true on [type] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.

    图1:

    一、版本信息

    elasticsearch-7.4.1
    kibana-7.4.1
    filebeat-7.4.1

    二、解决办法

    1、根据官网的信息,是对ES对应的索引的配置进行修改

    2、因为我的索引是根据日期来的,所以今天对今天的索引进行了修改,明天的又得修改;所以我的是直接对我的模板配置进行修改,这样只要是我这个模板下的索引,不管是现有的还是以后新添加的,都生效

    PUT _template/lile_log   #lile_log:Template名称
    {
      "index_patterns": ["lile*"],    # 这里模板模板下的所有索引通用的前缀
      "mappings": {
          "properties": {
              "fielddata-*": {
                  "type": "text",
                  "fielddata": true
            }
          }
        }
    }

    三、结果

    相关网址:

    https://www.elastic.co/guide/en/elasticsearch/reference/current/fielddata.html

  • 相关阅读:
    09 shell脚本程序练习
    springboot整合vue03-创建springboot工程
    springboot整合vue02-创建前端页面
    springboot整合vue01-创建vue工程
    pe工具04-获取数据目录
    pe工具03-获取节表信息
    pe工具02-解析pe头信息
    pe工具01-获取进程和模块
    以挂起方式创建进程
    进程
  • 原文地址:https://www.cnblogs.com/lemon-le/p/11932145.html
Copyright © 2011-2022 走看看