Files
doc-exports/docs/css/umn/css_02_0132.html
zhengxiu 93d856d5c5 css umn 25.6.0 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: zhengxiu <zhengxiu@huawei.com>
Co-committed-by: zhengxiu <zhengxiu@huawei.com>
2025-11-25 11:34:43 +00:00

1.5 KiB

How Do I Create a Type Under an Index in an Elasticsearch 7.x Cluster of CSS?

In Elasticsearch 7.x and later versions, types cannot be created for indexes.

If you need to use types, add include_type_name=true to the command. Only a single type is supported.

PUT index?include_type_name=true
{
  "mappings": {
    "my_type": {
      "properties": {
        "@timestamp": {
          "type": "date"
        }
      }
    }
  }
}

After a multi-type index is created, run the following command to write data into it:

PUT index/my_type/1
{
  "@timestamp":"2019-02-20"
}