码迷,mamicode.com
首页 > 其他好文 > 详细

Fielddata is disabled on text fields by default Set fielddata=true on [service.address]

时间:2020-01-09 18:35:01      阅读:81      评论:0      收藏:0      [点我收藏+]

标签:ping   add   topic   client   name   ice   ldd   isa   ble   

2个字段的:

PUT metricbeat-7.3.0/_mapping
{
  "properties": {
    "service": {
      "properties": {
        "address": {
          "type": "text",
          "fielddata": true,
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        }
      }
    }
  }
}

3个字段的:

PUT metricbeat-7.3.0/_mapping
{
  "properties": {
    "kafka": {
      "properties": {
        "topic": {
            "properties": {
                "name":{
                    "type": "text",
                    "fielddata": true,
                    "fields": {
                    "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                        }
                    }
                }
            }

        }
      }
    }
  }
}

4个字段的:

PUT metricbeat-7.3.0/_mapping
{
    "properties": {
        "kafka": { 
            "properties": {
                "consumergroup": {
                    "properties": {
                        "client":{
                            "properties": {
                                "id": {
                                    "type": "text",
                                    "fielddata": true,
                                    "fields": {
                                        "keyword": {
                                            "type": "keyword",
                                            "ignore_above": 256
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

Fielddata is disabled on text fields by default Set fielddata=true on [service.address]

标签:ping   add   topic   client   name   ice   ldd   isa   ble   

原文地址:https://www.cnblogs.com/sanduzxcvbnm/p/12172935.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!