ayang23

Elasticsearch 2.x 版本是不是只能考虑每个 document type 用一个单独的 index 了

  •  
  •   ayang23 · Mar 9, 2016 · 7259 views
    This topic created in 3741 days ago, the information mentioned may be changed or developed.
    v2.x 已经不支持 mapping 内单个字段类型的修改,也不支持 delete mapping
    如果 index 内多个 type, scheme migration 基本是不可能的
    是不是每个 document type 用一个单独的 index 才是正确的方式

    https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html

    Other than where documented, existing type and field mappings cannot be updated. Changing the mapping would mean invalidating already indexed documents. Instead, you should create a new index with the correct mappings and reindex your data into that index.

    https://www.elastic.co/guide/en/elasticsearch/reference/2.2/breaking_20_mapping_changes.html#_types_may_no_longer_be_deleted

    In 1.x it was possible to delete a type mapping, along with all of the documents of that type, using the delete mapping API. This is no longer supported, because remnants of the fields in the type could remain in the index, causing corruption later on.

    Instead, if you need to delete a type mapping, you should reindex to a new index which does not contain the mapping. If you just need to delete the documents that belong to that type, then use the delete-by-query plugin instead.
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1008 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 23:18 · PVG 07:18 · LAX 16:18 · JFK 19:18
    ♥ Do have faith in what you're doing.