Elasticsearch:一個索引只能包含一個映射類型

如果添加第二個type,會報錯:

Rejecting mapping update to [mtest]

as the final mapping would have more than 1 type: [one, two]。

查詢到官網的說明:

Indices created in Elasticsearch 6.0.0 or later may only contain a single mapping type. Indices created in 5.x with multiple mapping types will continue to function as before in Elasticsearch 6.x. Types will be deprecated in APIs in Elasticsearch 7.0.0, and completely removed in 8.0.0.

在6.0.0或者更高版本中僅支持單mapping type。對於5.X版本中多個mapping type依舊可以使用。計劃在7.0.0中完全移除type,並在8.0.0中完全刪除。

Elasticsearch:一個索引只能包含一個映射類型

相關鏈接:https://www.elastic.co/guide/en/elasticsearch/reference/6.0/removal-of-types.html


分享到:


相關文章: