POST _reindex { "source": { "index": "twitter" }, "dest": { "index": "new_twitter", "version_type": "internal" } }
Setting
version_type
to external
will cause Elasticsearch to preserve the version
from the source, create any documents that are missing, and update any documents that have an older version in the destination index than they do in the source index:When we want to create the missing document in the target index
POST _reindex { "conflicts": "proceed", "source": { "index": "twitter" }, "dest": { "index": "new_twitter", "op_type": "create" } }
No comments:
Post a Comment