public final class IndexSettings
extends java.lang.Object
IndexModule.addSettingsUpdateConsumer(Setting, Consumer)
that will
be called for each settings update.Modifier and Type | Field and Description |
---|---|
static Setting<java.lang.Boolean> |
ALLOW_UNMAPPED |
static Setting<java.lang.String> |
DEFAULT_FIELD_SETTING |
static TimeValue |
DEFAULT_GC_DELETES
Index setting to enable / disable deletes garbage collection.
|
static TimeValue |
DEFAULT_REFRESH_INTERVAL |
static Setting<java.lang.String> |
INDEX_CHECK_ON_STARTUP |
static Setting<TimeValue> |
INDEX_GC_DELETES_SETTING |
static Setting<TimeValue> |
INDEX_REFRESH_INTERVAL_SETTING |
static Setting<Translog.Durability> |
INDEX_TRANSLOG_DURABILITY_SETTING |
static Setting<ByteSizeValue> |
INDEX_TRANSLOG_FLUSH_THRESHOLD_SIZE_SETTING |
static Setting<TimeValue> |
INDEX_TRANSLOG_SYNC_INTERVAL_SETTING |
static Setting<java.lang.Boolean> |
INDEX_TTL_DISABLE_PURGE_SETTING |
static Setting<java.lang.Boolean> |
INDEX_WARMER_ENABLED_SETTING |
static Setting<java.lang.Integer> |
MAX_ADJACENCY_MATRIX_FILTERS_SETTING
Index setting describing the maximum number of filters clauses that can be used
in an adjacency_matrix aggregation.
|
static Setting<java.lang.Integer> |
MAX_REFRESH_LISTENERS_PER_SHARD
The maximum number of refresh listeners allows on this shard.
|
static Setting<java.lang.Integer> |
MAX_RESCORE_WINDOW_SETTING
Index setting describing the maximum size of the rescore window.
|
static Setting<java.lang.Integer> |
MAX_RESULT_WINDOW_SETTING
Index setting describing the maximum value of from + size on a query.
|
static Setting<java.lang.Integer> |
MAX_SLICES_PER_SCROLL
The maximum number of slices allowed in a scroll request
|
static Setting<java.lang.Boolean> |
QUERY_STRING_ALLOW_LEADING_WILDCARD |
static Setting<java.lang.Boolean> |
QUERY_STRING_ANALYZE_WILDCARD |
static Setting<java.lang.Boolean> |
QUERY_STRING_LENIENT_SETTING |
Constructor and Description |
---|
IndexSettings(IndexMetaData indexMetaData,
Settings nodeSettings)
Creates a new
IndexSettings instance. |
IndexSettings(IndexMetaData indexMetaData,
Settings nodeSettings,
java.util.function.Predicate<java.lang.String> indexNameMatcher,
IndexScopedSettings indexScopedSettings)
Creates a new
IndexSettings instance. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
customDataPath()
Returns the customDataPath for this index, if configured.
|
java.lang.String |
getDefaultField()
Returns the default search field for this index.
|
ByteSizeValue |
getFlushThresholdSize()
Returns the transaction log threshold size when to forcefully flush the index and clear the transaction log.
|
long |
getGcDeletesInMillis()
Returns the GC deletes cycle in milliseconds.
|
Index |
getIndex()
Returns the index this settings object belongs to
|
IndexMetaData |
getIndexMetaData()
Returns the current IndexMetaData for this index
|
Version |
getIndexVersionCreated()
Returns the version the index was created on.
|
int |
getMaxAdjacencyMatrixFilters()
Returns the max number of filters in adjacency_matrix aggregation search requests
|
int |
getMaxRefreshListeners()
The maximum number of refresh listeners allows on this shard.
|
int |
getMaxRescoreWindow()
Returns the maximum rescore window for search requests.
|
int |
getMaxResultWindow()
Returns the max result window for search requests, describing the maximum value of from + size on a query.
|
int |
getMaxSlicesPerScroll()
The maximum number of slices allowed in a scroll request.
|
org.apache.lucene.index.MergePolicy |
getMergePolicy()
Returns the merge policy that should be used for this index.
|
MergeSchedulerConfig |
getMergeSchedulerConfig()
Returns the
MergeSchedulerConfig |
java.lang.String |
getNodeName()
Returns the current node name
|
Settings |
getNodeSettings()
Returns the node settings.
|
int |
getNumberOfReplicas()
Returns the number of replicas this index has.
|
int |
getNumberOfShards()
Returns the number of shards this index has.
|
TimeValue |
getRefreshInterval()
Returns this interval in which the shards of this index are asynchronously refreshed.
|
IndexScopedSettings |
getScopedSettings() |
Settings |
getSettings()
Returns the settings for this index.
|
Translog.Durability |
getTranslogDurability()
Returns the translog durability for this index.
|
TimeValue |
getTranslogSyncInterval()
Returns the translog sync interval.
|
java.lang.String |
getUUID()
Returns the indexes UUID
|
<T> T |
getValue(Setting<T> setting) |
boolean |
hasCustomDataPath()
Returns
true if the index has a custom data path |
boolean |
isDefaultAllowUnmappedFields()
Returns
true if queries should be lenient about unmapped fields. |
boolean |
isOnSharedFilesystem()
Returns
true iff the given settings indicate that the index
associated with these settings allocates it's shards on a shared
filesystem. |
boolean |
isQueryStringAllowLeadingWildcard()
Returns
true if the query string parser should allow leading wildcards. |
boolean |
isQueryStringAnalyzeWildcard()
Returns
true if the query string should analyze wildcards. |
boolean |
isQueryStringLenient()
Returns
true if query string parsing should be lenient. |
boolean |
isShadowReplicaIndex()
Returns
true iff this index uses shadow replicas. |
boolean |
isSingleType()
Returns whether the index enforces at most one type.
|
boolean |
isTTLPurgeDisabled()
Returns
true if the TTL purge is disabled for this index. |
boolean |
isWarmerEnabled()
Returns true if index warmers are enabled, otherwise
false |
boolean |
matchesIndexName(java.lang.String expression)
Returns
true if the given expression matches the index name or one of it's aliases |
boolean |
updateIndexMetaData(IndexMetaData indexMetaData)
Updates the settings and index metadata and notifies all registered settings consumers with the new settings iff at least one setting has changed.
|
public static final Setting<java.lang.String> DEFAULT_FIELD_SETTING
public static final Setting<java.lang.Boolean> QUERY_STRING_LENIENT_SETTING
public static final Setting<java.lang.Boolean> QUERY_STRING_ANALYZE_WILDCARD
public static final Setting<java.lang.Boolean> QUERY_STRING_ALLOW_LEADING_WILDCARD
public static final Setting<java.lang.Boolean> ALLOW_UNMAPPED
public static final Setting<TimeValue> INDEX_TRANSLOG_SYNC_INTERVAL_SETTING
public static final Setting<Translog.Durability> INDEX_TRANSLOG_DURABILITY_SETTING
public static final Setting<java.lang.Boolean> INDEX_WARMER_ENABLED_SETTING
public static final Setting<java.lang.Boolean> INDEX_TTL_DISABLE_PURGE_SETTING
public static final Setting<java.lang.String> INDEX_CHECK_ON_STARTUP
public static final Setting<java.lang.Integer> MAX_RESULT_WINDOW_SETTING
public static final Setting<java.lang.Integer> MAX_RESCORE_WINDOW_SETTING
MAX_RESULT_WINDOW_SETTING
because they both do the same thing: control the size of the heap of hits.public static final Setting<java.lang.Integer> MAX_ADJACENCY_MATRIX_FILTERS_SETTING
public static final TimeValue DEFAULT_REFRESH_INTERVAL
public static final Setting<TimeValue> INDEX_REFRESH_INTERVAL_SETTING
public static final Setting<ByteSizeValue> INDEX_TRANSLOG_FLUSH_THRESHOLD_SIZE_SETTING
public static final TimeValue DEFAULT_GC_DELETES
public static final Setting<java.lang.Integer> MAX_REFRESH_LISTENERS_PER_SHARD
public static final Setting<java.lang.Integer> MAX_SLICES_PER_SCROLL
public IndexSettings(IndexMetaData indexMetaData, Settings nodeSettings)
IndexSettings
instance. The given node settings will be merged with the settings in the metadata
while index level settings will overwrite node settings.indexMetaData
- the index metadata this settings object is associated withnodeSettings
- the nodes settings this index is allocated on.public IndexSettings(IndexMetaData indexMetaData, Settings nodeSettings, java.util.function.Predicate<java.lang.String> indexNameMatcher, IndexScopedSettings indexScopedSettings)
IndexSettings
instance. The given node settings will be merged with the settings in the metadata
while index level settings will overwrite node settings.indexMetaData
- the index metadata this settings object is associated withnodeSettings
- the nodes settings this index is allocated on.indexNameMatcher
- a matcher that can resolve an expression to the index name or index aliaspublic java.lang.String getDefaultField()
public boolean isQueryStringLenient()
true
if query string parsing should be lenient. The default is false
public boolean isQueryStringAnalyzeWildcard()
true
if the query string should analyze wildcards. The default is false
public boolean isQueryStringAllowLeadingWildcard()
true
if the query string parser should allow leading wildcards. The default is true
public boolean isDefaultAllowUnmappedFields()
true
if queries should be lenient about unmapped fields. The default is true
public Settings getSettings()
public Index getIndex()
public java.lang.String getUUID()
public boolean hasCustomDataPath()
true
if the index has a custom data pathpublic java.lang.String customDataPath()
null
o.w.public boolean isOnSharedFilesystem()
true
iff the given settings indicate that the index
associated with these settings allocates it's shards on a shared
filesystem.public Version getIndexVersionCreated()
Version.indexCreated(Settings)
public java.lang.String getNodeName()
public IndexMetaData getIndexMetaData()
public int getNumberOfShards()
public int getNumberOfReplicas()
public boolean isShadowReplicaIndex()
true
iff this index uses shadow replicas.public boolean isSingleType()
public Settings getNodeSettings()
getSettings()
are a merged version of the
index settings and the node settings where node settings are overwritten by index settings.public boolean matchesIndexName(java.lang.String expression)
true
if the given expression matches the index name or one of it's aliasespublic boolean updateIndexMetaData(IndexMetaData indexMetaData)
true
iff any setting has been updated otherwise false
.public Translog.Durability getTranslogDurability()
public boolean isWarmerEnabled()
false
public TimeValue getTranslogSyncInterval()
public TimeValue getRefreshInterval()
public ByteSizeValue getFlushThresholdSize()
public MergeSchedulerConfig getMergeSchedulerConfig()
MergeSchedulerConfig
public int getMaxResultWindow()
public int getMaxAdjacencyMatrixFilters()
public int getMaxRescoreWindow()
public long getGcDeletesInMillis()
public org.apache.lucene.index.MergePolicy getMergePolicy()
public boolean isTTLPurgeDisabled()
true
if the TTL purge is disabled for this index. Default is false
public <T> T getValue(Setting<T> setting)
public int getMaxRefreshListeners()
public int getMaxSlicesPerScroll()
public IndexScopedSettings getScopedSettings()