Diese Seite ist in Ihrer lokalen Sprache noch nicht verfügbar. Wir arbeiten daran, weitere Sprachversionen hinzuzufügen. Vielen Dank für Ihre Unterstützung.

On this page

Show all

Help Center/ Cloud Search Service/ FAQs/ Using CSS Cluster Search Engines/ How Do I Create a Type Under an Index in an Elasticsearch 7.x Cluster of CSS?

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

Updated on 2024-12-02 GMT+08:00

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"
}
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback