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

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
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
posted @ 2020-01-09 18:21  哈喽哈喽111111  阅读(1852)  评论(0编辑  收藏  举报