Advanced elasticsearch: core concepts and implementation principles

Advanced elasticsearch: core concepts and implementation principles.

1. Elasticsearch core concepts
1.1 Index (index)
An index is a collection of documents with somewhat similar characteristics. For example, you could have an index for customer data, another for product catalogs, and another for order data. An index is identified by a name (must be all lowercase letters), and this name is used when we index, search, update, and delete documents in the index. In a cluster, any number of indexes can be defined.

The data that can be searched must be indexed. The advantage of this is that it can improve the query speed. For example, the directory in front of Xinhua Dictionary means index, and the directory can improve the query speed.

Note: The word index we usually use has different meanings in different environments.

Noun: In an elasticsearch cluster, many different indexes can be created, such as inverted indexes or b+ tree indexes in relational databases.

Verb: The process of saving a document doc to elasticsearch is also called indexing.

1.2 Type (type)
In elasticsearch, you can define one or more types in an index. However, in the later upgrades of elasticsearch, the concept of type was continuously weakened. Until elasticsearch 7.0 and later, type was officially abolished in es. After 7.0, it will not be used by default. It also supports custom index types. When creating a new index, a type _doc will be added by default. Therefore, the categories of elasticsearch and relational databases mentioned in the previous elasticsearch basics article are not accurate. It was said before that the index corresponds to the mysql database. I think here It is more appropriate for the index to correspond to a mysql table.

1.3 Document (Document)
A document is a basic information unit that can be indexed, that is, a piece of data

For example: you can have a certain customer's document&#x

Guess you like

Origin blog.csdn.net/u014374009/article/details/133156646