橡皮、老虎皮、狮子皮哪一个最不好?

es2.0 mapping删除的问题

Elasticsearch | 作者 panw | 发布于2015年12月01日 | 阅读数:9111

esasticSearch2.0中,mapping不再支持删除,官方文档中原话是:This is no longer supported, because remnants of the fields in the type could remain in the index, causing corruption later on
这个要怎么理解,,删就删了,怎么会有数据残留呢?大家怎么处理类型删除的需求的。
已邀请:

medcl - 今晚打老虎。

赞同来自:

下次记得贴链接:
https://www.elastic.co/guide/e ... leted
 
因为底层的Lucene其实没有type的概念,都是在一个lucene的库里面,里面有很多各种后缀的文件,相关的信息其实已经产生了,之前的删除type其实不是安全的,所以这个版本限制了这种用法。

redhat

赞同来自:

https://www.elastic.co/guide/e ... .html  地址更新了
 
Types may no longer be deletededit

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.

要回复问题请先登录注册