Kibana 5.4.0 - 垂直条数据可视化问题

时间:2018-05-29 15:44:27

标签: elasticsearch kibana

我能够创建索引并在发现选项卡中正确填充所有正在填充的数据。

   {
  "_index": "deal-expense",
  "_type": "kafka-connect",
  "_id": "deal-expense+0+63",
  "_version": 2,
  "_score": 1,
  "_source": {
    "EXPENSE_CODE": "NL**20",
    "EXPENSE_CODE_DESCRIPTION": "DO NOT USE ****** ****** - ADAM",
    "NO_OF_DEALS": 17
  }
}

数据可视化要求:

  1. 每个EXPENSE_CODE
  2. 可能有多个索引文档
  3. 在Y轴上我需要显示Max Of NO_OF_DEALS和On X Axis我需要显示EXPENSE_CODE
  4. 最多NO_OF_DEALS未填充,但正在填充EXPENSE_CODE
  5. 我的配置如下所示。 enter image description here

1 个答案:

答案 0 :(得分:0)

我们需要创建弹性搜索索引并将其映射到问题中提到的现有索引。

PUT /reindexed-deal-expense
{
  "mappings": {
    "doc": {
      "properties": {
        "geo": {
          "properties": {
            "EXPENSE_CODE": {
              "type": "keyword"
            },
            "NO_OF_DEALS": {
              "type": "integer"
            }
          }
        }
      }
    }
  }
}

并像这样映射

POST _reindex
{
  "source": {
    "index": "deal-expense"
  },
  "dest": {
    "index": "reindexed-deal-expense"
  }
} 

enter image description here