pelias / model

Pelias data models
6 stars 17 forks source link

support for dynamically specifying the elasticsearch _type from config #123

Closed missinglink closed 4 years ago

missinglink commented 4 years ago

this pairs with https://github.com/pelias/config/pull/118 & https://github.com/pelias/schema/pull/401 the motivation is being able to create indices compatible with ES7 while not yet breaking backwards support for ES5.

this allows us to create ES7 compatible indices using either ES6 or ES7 without breaking backwards compatibility with 5 yet.

the major motivation for this is that users currently building on pelias/docker on ES6 are going to find that the indices they created with ES6 (using _type:doc) are incompatible with ES7 (and also incompatible with ES6 once we change the type name to _doc!)

that doesn't really make sense, so I plan to set the config.schema.typeName variable to _doc in pelias/docker projects so that indices built with ES6 will not incur any breaking changes.

this is much preferred because without it any users migrating to ES6 would assume that in doing so they were avoiding breaking changes when in fact that wasn't true.