Package org.elasticsearch.action.support
Class AutoCreateIndex
java.lang.Object
org.elasticsearch.action.support.AutoCreateIndex
Encapsulates the logic of whether a new index should be automatically created when
a write operation is about to happen in a non existing index.
-
Field Summary
Modifier and TypeFieldDescriptionstatic Setting<org.elasticsearch.action.support.AutoCreateIndex.AutoCreate>
-
Constructor Summary
ConstructorDescriptionAutoCreateIndex(Settings settings, ClusterSettings clusterSettings, IndexNameExpressionResolver resolver, SystemIndices systemIndices)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
shouldAutoCreate(String index, ClusterState state)
Should the index be auto created?
-
Field Details
-
AUTO_CREATE_INDEX_SETTING
public static final Setting<org.elasticsearch.action.support.AutoCreateIndex.AutoCreate> AUTO_CREATE_INDEX_SETTING
-
-
Constructor Details
-
AutoCreateIndex
public AutoCreateIndex(Settings settings, ClusterSettings clusterSettings, IndexNameExpressionResolver resolver, SystemIndices systemIndices)
-
-
Method Details
-
shouldAutoCreate
Should the index be auto created?- Throws:
IndexNotFoundException
- if the index doesn't exist and shouldn't be auto created
-