0

I am currently using Elasticsearch 5, and working with data sets that take approximately a day to index each type. There are about 10 types.

The mapping for each type may change. In Elasticsearch 2 it was necessary to delete the type and reindex. However in Elasticsearch 5, it is necessary to delete and reindex the entire index.

I can live with taking a day to reindex whenever a mapping changes, but not 10 days.

The only way I can see round this is to have a separate index for each type. Is this an acceptable approach or could there be potential problems with this?

Paul T Davies
  • 2,527
  • 2
  • 22
  • 39
  • 1
    Well, if your types change (whether often or not) then I would definitely opt for having one type per index, of course, in order minimize the time it takes to reindex your data. – Val Jan 26 '17 at 14:47
  • 1
    According to https://www.elastic.co/guide/en/elasticsearch/reference/current/general-recommendations.html#sparsity it seems like if the mappings are non-trivially different then you should only have one type per index. This would also help avoid some gotchas with having the same field name in different types. – Josh Coady Apr 05 '17 at 00:57
  • 1
    Just found this also https://github.com/elastic/elasticsearch/issues/15613 which indicates that they are moving toward essentially deprecating types and having one mapping per index. – Josh Coady Apr 05 '17 at 01:10

0 Answers0