新建索引,删除索引,修改索引

新建索引delta_notification_2023.02.28

PUT delta_notification_2023.02.28
{
    "mappings" : {
      "properties" : {
        "alarmContent" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "alarmName" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "appEnName" : {
          "type" : "keyword"
        },
        "appOwner" : {
          "type" : "keyword"
        },
        "begin_time" : {
          "type" : "date"
        },
        "endWindow" : {
          "type" : "date"
        },
        "endpoint" : {
          "type" : "keyword"
        },
        "id" : {
          "type" : "keyword"
        },
        "isSuccess" : {
          "type" : "boolean"
        },
        "labels" : {
          "type" : "keyword"
        },
        "level" : {
          "type" : "keyword"
        },
        "messageId" : {
          "type" : "keyword"
        },
        "metric" : {
          "type" : "keyword"
        },
        "notifyEnable" : {
          "type" : "boolean"
        },
        "notifyMethod" : {
          "type" : "keyword"
        },
        "notifyTime" : {
          "type" : "date"
        },
        "originalData" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "processTime" : {
          "type" : "date"
        },
        "receivers" : {
          "type" : "keyword"
        },
        "resGroupName" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "resourceId" : {
          "type" : "keyword"
        },
        "resourceType" : {
          "type" : "keyword"
        },
        "role" : {
          "type" : "keyword"
        },
        "ruleGroupKey" : {
          "type" : "keyword"
        },
        "ruleKey" : {
          "type" : "keyword"
        },
        "runAt" : {
          "type" : "long"
        },
        "saving_time" : {
          "type" : "date"
        },
        "smartlog_ip" : {
          "type" : "keyword"
        },
        "startWindow" : {
          "type" : "date"
        },
        "threshold" : {
          "type" : "float"
        },
        "timestamp" : {
          "type" : "date"
        },
        "value" : {
          "type" : "float"
        }
      }
    }
  }

查看索引delta_notification_2023.02.28对应的mapping

GET delta_notification_2023.02.28/_mapping
{
  "delta_notification_2023.02.28" : {
    "mappings" : {
      "properties" : {
        "alarmContent" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "alarmName" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "appEnName" : {
          "type" : "keyword"
        },
        "appOwner" : {
          "type" : "keyword"
        },
        "begin_time" : {
          "type" : "date"
        },
        "endWindow" : {
          "type" : "date"
        },
        "endpoint" : {
          "type" : "keyword"
        },
        "id" : {
          "type" : "keyword"
        },
        "isSuccess" : {
          "type" : "boolean"
        },
        "labels" : {
          "type" : "keyword"
        },
        "level" : {
          "type" : "keyword"
        },
        "messageId" : {
          "type" : "keyword"
        },
        "metric" : {
          "type" : "keyword"
        },
        "notifyEnable" : {
          "type" : "boolean"
        },
        "notifyMethod" : {
          "type" : "keyword"
        },
        "notifyTime" : {
          "type" : "date"
        },
        "originalData" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "processTime" : {
          "type" : "date"
        },
        "receivers" : {
          "type" : "keyword"
        },
        "resGroupName" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "resourceId" : {
          "type" : "keyword"
        },
        "resourceType" : {
          "type" : "keyword"
        },
        "role" : {
          "type" : "keyword"
        },
        "ruleGroupKey" : {
          "type" : "keyword"
        },
        "ruleKey" : {
          "type" : "keyword"
        },
        "runAt" : {
          "type" : "long"
        },
        "saving_time" : {
          "type" : "date"
        },
        "smartlog_ip" : {
          "type" : "keyword"
        },
        "startWindow" : {
          "type" : "date"
        },
        "threshold" : {
          "type" : "float"
        },
        "timestamp" : {
          "type" : "date"
        },
        "value" : {
          "type" : "float"
        }
      }
    }
  }
}

删除索引

DELETE delta_notification_2023.02.28
posted @ 2023-02-28 16:32  SpecialSpeculator  阅读(15)  评论(0编辑  收藏  举报