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.util.List<java.lang.String>> |
DEFAULT_FIELD_SETTING |
static java.lang.String |
DEFAULT_FIELD_SETTING_KEY |
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 java.lang.String |
INDEX_MAPPING_SINGLE_TYPE_SETTING_KEY |
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<ByteSizeValue> |
INDEX_TRANSLOG_GENERATION_THRESHOLD_SIZE_SETTING
The maximum size of a translog generation.
|
static Setting<TimeValue> |
INDEX_TRANSLOG_RETENTION_AGE_SETTING
Controls how long translog files that are no longer needed for persistence reasons
will be kept around before being deleted.
|
static Setting<ByteSizeValue> |
INDEX_TRANSLOG_RETENTION_SIZE_SETTING
Controls how many translog files that are no longer needed for persistence reasons
will be kept around before being deleted.
|
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_DOCVALUE_FIELDS_SEARCH_SETTING
Index setting describing the maximum value of allowed `docvalue_fields`that can be retrieved
per search request.
|
static Setting<java.lang.Integer> |
MAX_INNER_RESULT_WINDOW_SETTING
Index setting describing the maximum value of from + size on an individual inner hit definition or
top hits aggregation.
|
static Setting<java.lang.Integer> |
MAX_NGRAM_DIFF_SETTING
Index setting describing for NGramTokenizer and NGramTokenFilter
the maximum difference between
max_gram (maximum length of characters in a gram) and
min_gram (minimum length of characters in a gram).
|
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_SCRIPT_FIELDS_SETTING
Index setting describing the maximum value of allowed `script_fields`that can be retrieved
per search request.
|
static Setting<java.lang.Integer> |
MAX_SHINGLE_DIFF_SETTING
Index setting describing for ShingleTokenFilter
the maximum difference between
max_shingle_size and min_shingle_size.
|
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,
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.util.List<java.lang.String> |
getDefaultFields()
Returns the default search fields 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.
|
ByteSizeValue |
getGenerationThresholdSize()
Returns the generation threshold size.
|
Index |
getIndex()
Returns the index this settings object belongs to
|
IndexMetaData |
getIndexMetaData()
Returns the current IndexMetaData for this index
|
IndexSortConfig |
getIndexSortConfig()
Returns the index sort config that should be used 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 |
getMaxDocvalueFields()
Returns the maximum number of allowed docvalue_fields to retrieve in a search request
|
int |
getMaxInnerResultWindow()
Returns the max result window for an individual inner hit definition or top hits aggregation.
|
int |
getMaxNgramDiff()
Returns the maximum allowed difference between max and min length of ngram
|
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 |
getMaxScriptFields()
Returns the maximum number of allowed script_fields to retrieve in a search request
|
int |
getMaxShingleDiff()
Returns the maximum allowed difference between max and min shingle_size
|
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 |
getTranslogRetentionAge()
Returns the transaction log retention age which controls the maximum age (time from creation) that translog files will be kept around
|
ByteSizeValue |
getTranslogRetentionSize()
Returns the transaction log retention size which controls how much of the translog is kept around to allow for ops based recoveries
|
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 |
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 |
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 |
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 java.lang.String DEFAULT_FIELD_SETTING_KEY
public static final Setting<java.util.List<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_SCRIPT_FIELDS_SETTING
public static final Setting<java.lang.Integer> MAX_INNER_RESULT_WINDOW_SETTING
public static final Setting<java.lang.Integer> MAX_NGRAM_DIFF_SETTING
public static final Setting<java.lang.Integer> MAX_SHINGLE_DIFF_SETTING
public static final Setting<java.lang.Integer> MAX_DOCVALUE_FIELDS_SEARCH_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 Setting<TimeValue> INDEX_TRANSLOG_RETENTION_AGE_SETTING
public static final Setting<ByteSizeValue> INDEX_TRANSLOG_RETENTION_SIZE_SETTING
public static final Setting<ByteSizeValue> INDEX_TRANSLOG_GENERATION_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 static final java.lang.String INDEX_MAPPING_SINGLE_TYPE_SETTING_KEY
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, 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.public java.util.List<java.lang.String> getDefaultFields()
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 Version getIndexVersionCreated()
Version.indexCreated(Settings)
public java.lang.String getNodeName()
public IndexMetaData getIndexMetaData()
public int getNumberOfShards()
public int getNumberOfReplicas()
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 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 ByteSizeValue getTranslogRetentionSize()
public TimeValue getTranslogRetentionAge()
public ByteSizeValue getGenerationThresholdSize()
public MergeSchedulerConfig getMergeSchedulerConfig()
MergeSchedulerConfig
public int getMaxResultWindow()
public int getMaxInnerResultWindow()
public int getMaxAdjacencyMatrixFilters()
public int getMaxRescoreWindow()
public int getMaxDocvalueFields()
public int getMaxNgramDiff()
public int getMaxShingleDiff()
public int getMaxScriptFields()
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 IndexSortConfig getIndexSortConfig()
public IndexScopedSettings getScopedSettings()