richardwilly98/elasticsearch-river-mongodb

Mapping changing from custom mapping to dynamic when drop_collection = true

dittu opened this issue · 2 comments

Hi,

I have set drop_collection = true in my river settings with custom mapping for index. Until the index comes across the drop collection in oplog mapping is staying dynamic but when it performs drop collection then mapping is deleted and dynamic mapping is occurring which is causing some issues in indexing due to which the whole collection is not being indexed.

Thanks for looking into all the issues I keep on posting.

Thanks,

Aditya

Hi,

You are correct... The most efficient way to delete all documents from a type in ES is to delete the mapping but unfortunately the river does not captured the mapping between to delete and reapply it.
I will look at this issue.

In the meantime if you are using admin indices templates [1] I believe that should address this issue.

[1] - http://www.elasticsearch.org/guide/reference/api/admin-indices-templates/

Thanks,
Richard.

Fix available in release 1.7.0.