elasticsearch,kibana,kibana-7,Amazon Web Services,elasticsearch,Kibana,Kibana 7" /> elasticsearch,kibana,kibana-7,Amazon Web Services,elasticsearch,Kibana,Kibana 7" />

Amazon web services 如何在kibana的索引中正确嵌套映射?

Amazon web services 如何在kibana的索引中正确嵌套映射?,amazon-web-services,elasticsearch,kibana,kibana-7,Amazon Web Services,elasticsearch,Kibana,Kibana 7,我正在尝试创建一个具有嵌套映射的索引,但我不确定json数据应该是什么样子。我使用的是kibana V7.4.2版。下面的示例是有效的,但是如果我尝试添加任何嵌套映射(示例2),最后会出现错误 样本1 PUT testIndex?pretty=true { "mappings":{ "_doc":{ "properties":{ "time":{

我正在尝试创建一个具有嵌套映射的索引,但我不确定json数据应该是什么样子。我使用的是kibana V7.4.2版。下面的示例是有效的,但是如果我尝试添加任何嵌套映射(示例2),最后会出现错误

样本1

PUT testIndex?pretty=true 
{
   "mappings":{
      "_doc":{
         "properties":{
            "time":{
               "type":"date",
               "format":"HH:mm:ss"
            }
         }
      }
   }
}
样本2

PUT testIndex?pretty=true 
{
   "mappings":{
      "_doc":{
         "properties":{
            "time":{
               "type":"date",
               "format":"HH:mm:ss"
            }
         },
         "predicted":{
            "type":"nested",
            "properties":{
               "numofreq":{
                          "type":"integer"
                         }
                 }
         }
      }
   }
}
PUT testindex1?pretty=true 
{
  "mappings": {
    "properties": {
      "time": {
        "type": "date",
        "format": "HH:mm:ss"
      },
      "predicted": {
        "type": "nested",
        "properties": {
          "numofreq": {
            "type": "integer"
          }
        }
      }
    }
  }
}
错误


在较新版本的elasticsearch中,指定文档类型已被删除
这应该行得通
样本1

PUT testindex?pretty=true 
{
  "mappings": {
    "properties": {
      "time": {
        "type": "date",
        "format": "HH:mm:ss"
      }
    }
  }
}
样本2

PUT testIndex?pretty=true 
{
   "mappings":{
      "_doc":{
         "properties":{
            "time":{
               "type":"date",
               "format":"HH:mm:ss"
            }
         },
         "predicted":{
            "type":"nested",
            "properties":{
               "numofreq":{
                          "type":"integer"
                         }
                 }
         }
      }
   }
}
PUT testindex1?pretty=true 
{
  "mappings": {
    "properties": {
      "time": {
        "type": "date",
        "format": "HH:mm:ss"
      },
      "predicted": {
        "type": "nested",
        "properties": {
          "numofreq": {
            "type": "integer"
          }
        }
      }
    }
  }
}