- All Known Implementing Classes:
DataTier.DefaultHotAllocationSettingProvider
,IndexMode.IndexModeSettingsProvider
public interface IndexSettingProvider
An
IndexSettingProvider
is a provider for index level settings that can be set
explicitly as a default value (so they show up as "set" for newly created indices)-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final record
Infrastructure class that holds services that can be used byIndexSettingProvider
instances. -
Method Summary
Modifier and TypeMethodDescriptiongetAdditionalIndexSettings
(String indexName, String dataStreamName, IndexMode templateIndexMode, Metadata metadata, Instant resolvedAt, Settings indexTemplateAndCreateRequestSettings, List<CompressedXContent> combinedTemplateMappings) Returns explicitly set default indexSettings
for the given index.default boolean
Indicates whether the additional settings that this provider returns can overrule the settings defined in matching template or in create index request.
-
Method Details
-
getAdditionalIndexSettings
Settings getAdditionalIndexSettings(String indexName, @Nullable String dataStreamName, @Nullable IndexMode templateIndexMode, Metadata metadata, Instant resolvedAt, Settings indexTemplateAndCreateRequestSettings, List<CompressedXContent> combinedTemplateMappings) Returns explicitly set default indexSettings
for the given index. This should not return null.- Parameters:
indexName
- The name of the new index being createddataStreamName
- The name of the data stream if the index being created is part of a data stream otherwisenull
templateIndexMode
- The index mode defined in template if template creates data streams, otherwisenull
is returned.metadata
- The current metadata instance that doesn't yet contain the index to be createdresolvedAt
- The time the request to create this new index was accepted.indexTemplateAndCreateRequestSettings
- All the settings resolved from the template that matches and any settings defined on the create index requestcombinedTemplateMappings
- All the mappings resolved from the template that matches
-
overrulesTemplateAndRequestSettings
default boolean overrulesTemplateAndRequestSettings()Indicates whether the additional settings that this provider returns can overrule the settings defined in matching template or in create index request. Note that this is not used during index template validation, to avoid overruling template settings that may apply to different contexts (e.g. the provider is not used, or it returns different setting values).
-