elasticsearch 在kibana面板中使用嵌套字段,elasticsearch,kibana,elasticsearch,Kibana" /> elasticsearch 在kibana面板中使用嵌套字段,elasticsearch,kibana,elasticsearch,Kibana" />

elasticsearch 在kibana面板中使用嵌套字段

elasticsearch 在kibana面板中使用嵌套字段,elasticsearch,kibana,elasticsearch,Kibana,我试着展示一个Kibana仪表板,效果很好。不幸的是,当我想添加包含公司所在国家/地区的饼图(或其他表示法)时,我的面板是空的 我可以使用kibana查询对特定国家/地区进行筛选,但无法显示包含嵌套文档的面板 我的映射(我必须使用嵌套字段,因为公司可以有多个位置): 您知道如何显示带有嵌套对象的面板吗?它是否得到实施 谢谢, Kevin映射中缺少一个参数(“include_in_parent”:true)。 正确的映射应为: { "settings" : { "number_of_s

我试着展示一个Kibana仪表板,效果很好。不幸的是,当我想添加包含公司所在国家/地区的饼图(或其他表示法)时,我的面板是空的

我可以使用kibana查询对特定国家/地区进行筛选,但无法显示包含嵌套文档的面板

我的映射(我必须使用嵌套字段,因为公司可以有多个位置):

您知道如何显示带有嵌套对象的面板吗?它是否得到实施

谢谢,
Kevin

映射中缺少一个参数(“include_in_parent”:true)。 正确的映射应为:

{
  "settings" : {
    "number_of_shards" : 1
  },
  "mappings": {
    "company" : {
      "properties" : {
        "name" : { "type" : "string", "store" : "yes" },
        "website" : { "type" : "string", "store" : "yes" },
        "employees" : { "type" : "string", "store" : "yes" },
        "type": { "type" : "string", "store" : "yes" },
        "locations" : {
          "type" : "nested",
          "include_in_parent": true,
          "properties" : {
            "city" : { "type" : "string", "store" : "yes" },
            "country" : { "type" : "string", "store" : "yes" },
            "coordinates" : { "type" : "geo_point", "store" : "yes" }
          }
        }
      }
    }
  }
}

很明显,这是一只Kibana虫子。Kibana生成的刻面查询缺少“嵌套”字段来表明这一点。

我假设您尝试在术语面板中使用“locations.country”作为所选字段?在Kibana 3上,添加include_in_parent:true不会使嵌套对象像location.country上面的对象那样由Kibana映射。
{
  "settings" : {
    "number_of_shards" : 1
  },
  "mappings": {
    "company" : {
      "properties" : {
        "name" : { "type" : "string", "store" : "yes" },
        "website" : { "type" : "string", "store" : "yes" },
        "employees" : { "type" : "string", "store" : "yes" },
        "type": { "type" : "string", "store" : "yes" },
        "locations" : {
          "type" : "nested",
          "include_in_parent": true,
          "properties" : {
            "city" : { "type" : "string", "store" : "yes" },
            "country" : { "type" : "string", "store" : "yes" },
            "coordinates" : { "type" : "geo_point", "store" : "yes" }
          }
        }
      }
    }
  }
}