【问题标题】:How to map objects with similar names in different documents to the same ElasticSearch / Kibana field?如何将不同文档中名称相似的对象映射到同一个 ElasticSearch / Kibana 字段?
【发布时间】:2015-01-17 13:22:21
【问题描述】:

考虑以下 JSON 文件:-

文件 1 -

{
   "titleSony": "The Matrix",
   "cast": [
      {
         "firstName": "Keanu",
         "lastName": "Reeves"
      }
   ]
}

文件 2 -

{
   "titlePixar": "The Matrix",
   "cast": [
      {
         "firstName": "Laurence",
         "lastName": "Fishburne"
      }
   ]
}

现在,既然 'titleSony' 和 'titlePixar' 本质上是指同一个对象,有没有办法将它映射到 ElasticSearch 中的同一个字段?

类似,在 Kibana 中也显示为同一个字段?

【问题讨论】:

    标签: elasticsearch lucene mapping nested-attributes kibana


    【解决方案1】:

    ElasticSearch 不支持文档之间的关系。但是,他们确实有关于 managing relational data 的指南。实现应用程序端连接可能如下所示:

    文件 1(_type=电影)

    {
       "titleSony": 123,
       "cast": [...],
    }
    

    文件 2(_type=电影)

    {
       "titlePixar": 123,
       "cast": [...],
    }
    

    文件 3 (_type=movieTitle)

    {
       "titleID": 123,
       "title": "The Matrix",
    }
    

    在 Kibana 中有 no plans 支持应用程序端连接。

    【讨论】:

      猜你喜欢
      • 2012-04-02
      • 2018-01-05
      • 2021-04-16
      • 1970-01-01
      • 2019-12-17
      • 2011-09-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多