
Indexes
An index is a container that stores and manages documents of a single type in Elasticsearch. We will look at type in the next section. An index can contain documents of a single Type, as depicted in the following diagram:

An index is a logical container of a type. Some configuration parameters are defined at the index level, while other configuration parameters are defined at the type level, as we will see later in this chapter.
The concept of index in Elasticsearch is roughly analogous to the database schema in a relational database. Going by that analogy, a type in Elasticsearch is equivalent to a table, and a document is equivalent to a record in the table. But please keep in mind that this analogy is just for ease of understanding. Unlike relational database schemas, which almost always contain multiple tables, one index can just contain one type.
With Elasticsearch 7.0, one index can strictly contain only one type by default. Attempting to create a second type would result in the following error: Rejecting mapping update to [index1] as the final mapping would have more than 1 type: [type1, type2].