Elasticsearch removal of the concept of type in version 7.X

Background note

Elasticsearch is based on Apache Lucene (TM) open source search engine. Whether in the field of open source or proprietary, Lucene can be considered to be by far the most advanced, highest performance, most versatile search engine library.

Elasticsearch a NoSQL databases (non-relational databases), and a conventional relational database (example: MySQL, Oralce etc.) of the basic concept of correspondence is as follows:

Elasticsearch:index --> type --> doc --> field

MySQL: Database -> Data Sheet -> OK -> Columns

As early as relational databases than non-relational database concepts presented, and very mature and widely used.

So, then many NoSQL (including: MongoDB, Elasticsearch, etc.) and are referenced to the extension of the basic concepts of traditional relational databases.

An objective phenomenon and facts are as follows:

Elasticsearch recent version of the official website of the evolution of the type proposed concept is as follows:

In 5.X version, the next index can create multiple type;

In 6.X version, a lower index can only be one type;

In 7.X versions, in addition to directly to the concept of type, that index will no longer type.

Why remove the notion of type?

Why not start 6.X version directly remove type, but to the phasing out of type?

Why?!

Cause Analysis

1, why should the concept of type of removal?

A: Because the early Elasticsearch design, design patterns directly examine the relational database, there is the concept of type (data sheet) is.

However, the search engine is based on Lucene, this "gene" determines the type superfluous. Lucene full-text search function is the reason why fast, because of the presence of inverted index.

The generation of such inverted index is based on the index, rather than type. Instead, multiple type will slow down the search.

In order to maintain Elasticsearch "everything for the search," the purpose, appropriate to make some changes (removal type) is understandable, and it is worth it.

So, Why not? !

2, why not start 6.X version directly remove type, but to the phasing out of type?

A: For historical reasons, the early Elasticsearch supports multiple type of the next index, moreover, there are many projects in Elasticsearch use as a database.

If the direct removal of the concept of type, not only many applications Elasticsearch project will face major changes in operations, functions and code,

And for Elasticsearch official, it is also a huge challenge (this is the beating of major surgery, many related to the type of source is to be modified).

Guess you like

Origin www.cnblogs.com/vinic-xxm/p/11825612.html