|
@@ -83,6 +83,7 @@ import org.elasticsearch.index.IndexSettings;
|
|
|
import org.elasticsearch.index.analysis.AnalysisRegistry;
|
|
import org.elasticsearch.index.analysis.AnalysisRegistry;
|
|
|
import org.elasticsearch.index.cache.request.ShardRequestCache;
|
|
import org.elasticsearch.index.cache.request.ShardRequestCache;
|
|
|
import org.elasticsearch.index.engine.CommitStats;
|
|
import org.elasticsearch.index.engine.CommitStats;
|
|
|
|
|
+import org.elasticsearch.index.engine.EngineConfig;
|
|
|
import org.elasticsearch.index.engine.EngineFactory;
|
|
import org.elasticsearch.index.engine.EngineFactory;
|
|
|
import org.elasticsearch.index.engine.InternalEngineFactory;
|
|
import org.elasticsearch.index.engine.InternalEngineFactory;
|
|
|
import org.elasticsearch.index.fielddata.IndexFieldDataCache;
|
|
import org.elasticsearch.index.fielddata.IndexFieldDataCache;
|
|
@@ -493,6 +494,11 @@ public class IndicesService extends AbstractLifecycleComponent
|
|
|
List<IndexEventListener> builtInListeners,
|
|
List<IndexEventListener> builtInListeners,
|
|
|
IndexingOperationListener... indexingOperationListeners) throws IOException {
|
|
IndexingOperationListener... indexingOperationListeners) throws IOException {
|
|
|
final IndexSettings idxSettings = new IndexSettings(indexMetaData, settings, indexScopedSettings);
|
|
final IndexSettings idxSettings = new IndexSettings(indexMetaData, settings, indexScopedSettings);
|
|
|
|
|
+ if (idxSettings.getIndexVersionCreated().onOrAfter(Version.V_7_0_0)
|
|
|
|
|
+ && EngineConfig.INDEX_OPTIMIZE_AUTO_GENERATED_IDS.exists(idxSettings.getSettings())) {
|
|
|
|
|
+ throw new IllegalArgumentException(
|
|
|
|
|
+ "Setting [" + EngineConfig.INDEX_OPTIMIZE_AUTO_GENERATED_IDS.getKey() + "] was removed in version 7.0.0");
|
|
|
|
|
+ }
|
|
|
// we ignore private settings since they are not registered settings
|
|
// we ignore private settings since they are not registered settings
|
|
|
indexScopedSettings.validate(indexMetaData.getSettings(), true, true, true);
|
|
indexScopedSettings.validate(indexMetaData.getSettings(), true, true, true);
|
|
|
logger.debug("creating Index [{}], shards [{}]/[{}] - reason [{}]",
|
|
logger.debug("creating Index [{}], shards [{}]/[{}] - reason [{}]",
|