Problems changing type in reindex

I am ES 6.8 -- trying to get stuff tidy to migrate to 7.x

Using ruby api to do the reindex :

client.reindex source: { index:index_name, type: 'auth' }, target: { index: new_index_name, type: 'doc' },refresh: true

The aim is to reduce the number of shards per index to that given in the new index template. The new index template also has a different type (_doc).

The new index gets with the correct number of shards but is empty. All writes to the new index fail with
as the final mapping would have more than 1 type: [_doc, auth]

I have tried various combinations of setting type in source and target but I always get the same result.

The source type is 'auth' and the target one is '_doc'

After a of of trial and error I found that

client.reindex source: { index:index_name, type: 'auth' }, target: { index: new_index_name, type: 'auth' }

ran without errors

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.