Open pulkitsinghal opened 7 years ago
We must make sure that the following optimization is possible for most if not all versions of ES.
/* * 1. create a data structure from `self.settings.mappings` * that has all mappings grouped under a unique index name * { * shakespeare : { * index: "shakespeare", * body: { * mappings: { * modelNameOrExplicitTypeName_A: { * properties: {...} * }, * modelNameOrExplicitTypeName_B: { * properties: {...} * } * } * } * }, * juju : { * index: "juju", * body: { * mappings: { * modelNameOrExplicitTypeName_C: { * properties: {...} * }, * modelNameOrExplicitTypeName_D: { * properties: {...} * } * } * } * } * } * * 2. Then for each entry, optimize mapping and indexing to happen in one atomic request to ES */
We must make sure that the following optimization is possible for most if not all versions of ES.
References: