JavaScript is disabled on your browser.
Nested Class Summary
Nested Classes
static enum
static class
static enum
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
Field Summary
Fields
Whether the index is considered hidden or not.
The user provided name for an index.
The number of active shard copies to check for before proceeding with a write operation.
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Adds human readable version and creation date settings.
Returns serializable object representing differences between this and previousState
boolean
fromXContent (org.elasticsearch.xcontent.XContentParser parser)
long
long
Return the
Version
on which this index has been created.
long
int
int
int
Returns the routing factor for this index.
static int
Returns the routing factor for and shrunk index with the given number of target shards.
int
Returns the number of shards that should be used for routing.
int
long
int
int
long
int
boolean
boolean
boolean
boolean
boolean
Test whether the current index UUID is the same as the given one.
boolean
boolean
Return the concrete mapping for this index or null
if this index has no mappings at all.
static int
Parses the number from the rolled over index name.
long
The term of the current selected primary.
int
Returns the source shard ID to clone the given target shard off
Selects the source shards for a local shard recovery.
Returns the source shard ids to shrink into the given shard id.
Returns the source shard ID to split the given target shard off
org.elasticsearch.xcontent.XContentBuilder
toXContent (org.elasticsearch.xcontent.XContentBuilder builder,
org.elasticsearch.xcontent.ToXContent.Params params)
void
void
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
Field Details
INDEX_READ_ONLY_ALLOW_DELETE_BLOCK
public static final ClusterBlock INDEX_READ_ONLY_ALLOW_DELETE_BLOCK
INDEX_SETTING_PREFIX
public static final String INDEX_SETTING_PREFIX
See Also:
SETTING_NUMBER_OF_SHARDS
public static final String SETTING_NUMBER_OF_SHARDS
See Also:
INDEX_NUMBER_OF_SHARDS_SETTING
SETTING_NUMBER_OF_REPLICAS
public static final String SETTING_NUMBER_OF_REPLICAS
See Also:
INDEX_NUMBER_OF_REPLICAS_SETTING
SETTING_ROUTING_PARTITION_SIZE
public static final String SETTING_ROUTING_PARTITION_SIZE
See Also:
INDEX_ROUTING_PARTITION_SIZE_SETTING
public static final Setting <Integer > INDEX_ROUTING_PARTITION_SIZE_SETTING
INDEX_NUMBER_OF_ROUTING_SHARDS_SETTING
public static final Setting <Integer > INDEX_NUMBER_OF_ROUTING_SHARDS_SETTING
SETTING_AUTO_EXPAND_REPLICAS
public static final String SETTING_AUTO_EXPAND_REPLICAS
See Also:
INDEX_AUTO_EXPAND_REPLICAS_SETTING
SETTING_READ_ONLY
public static final String SETTING_READ_ONLY
SETTING_BLOCKS_READ
public static final String SETTING_BLOCKS_READ
INDEX_BLOCKS_READ_SETTING
SETTING_BLOCKS_WRITE
public static final String SETTING_BLOCKS_WRITE
INDEX_BLOCKS_WRITE_SETTING
SETTING_READ_ONLY_ALLOW_DELETE
public static final String SETTING_READ_ONLY_ALLOW_DELETE
INDEX_BLOCKS_READ_ONLY_ALLOW_DELETE_SETTING
public static final Setting <Boolean > INDEX_BLOCKS_READ_ONLY_ALLOW_DELETE_SETTING
SETTING_VERSION_CREATED
public static final String SETTING_VERSION_CREATED
See Also:
SETTING_INDEX_VERSION_CREATED
SETTING_VERSION_CREATED_STRING
public static final String SETTING_VERSION_CREATED_STRING
See Also:
SETTING_CREATION_DATE
public static final String SETTING_CREATION_DATE
See Also:
SETTING_VERSION_UPGRADED
Deprecated.
These internal settings are no longer added to new indices. They are deprecated but still defined
to retain compatibility with old indexes. TODO: remove in 9.0.
See Also:
SETTING_VERSION_UPGRADED_STRING
Deprecated.
See Also:
SETTING_INDEX_PROVIDED_NAME
public static final String SETTING_INDEX_PROVIDED_NAME
The user provided name for an index. This is the plain string provided by the user when the index was created.
It might still contain date math expressions etc. (added in 5.0)
See Also:
SETTING_PRIORITY
public static final String SETTING_PRIORITY
See Also:
SETTING_CREATION_DATE_STRING
public static final String SETTING_CREATION_DATE_STRING
See Also:
SETTING_INDEX_UUID
public static final String SETTING_INDEX_UUID
See Also:
SETTING_HISTORY_UUID
public static final String SETTING_HISTORY_UUID
See Also:
SETTING_DATA_PATH
public static final String SETTING_DATA_PATH
See Also:
INDEX_UUID_NA_VALUE
public static final String INDEX_UUID_NA_VALUE
See Also:
INDEX_ROUTING_REQUIRE_GROUP_PREFIX
public static final String INDEX_ROUTING_REQUIRE_GROUP_PREFIX
See Also:
INDEX_ROUTING_INCLUDE_GROUP_PREFIX
public static final String INDEX_ROUTING_INCLUDE_GROUP_PREFIX
See Also:
INDEX_ROUTING_EXCLUDE_GROUP_PREFIX
public static final String INDEX_ROUTING_EXCLUDE_GROUP_PREFIX
See Also:
INDEX_ROUTING_REQUIRE_GROUP_SETTING
INDEX_ROUTING_INCLUDE_GROUP_SETTING
INDEX_ROUTING_EXCLUDE_GROUP_SETTING
INDEX_ROUTING_INITIAL_RECOVERY_GROUP_SETTING
SETTING_WAIT_FOR_ACTIVE_SHARDS
The number of active shard copies to check for before proceeding with a write operation.
SETTING_INDEX_HIDDEN
public static final String SETTING_INDEX_HIDDEN
See Also:
INDEX_HIDDEN_SETTING
Whether the index is considered hidden or not. A hidden index will not be resolved in
normal wildcard searches unless explicitly allowed
KEY_IN_SYNC_ALLOCATIONS
public static final String KEY_IN_SYNC_ALLOCATIONS
See Also:
KEY_PRIMARY_TERMS
public static final String KEY_PRIMARY_TERMS
See Also:
INDEX_STATE_FILE_PREFIX
public static final String INDEX_STATE_FILE_PREFIX
See Also:
INDEX_RESIZE_SOURCE_UUID_KEY
public static final String INDEX_RESIZE_SOURCE_UUID_KEY
See Also:
INDEX_RESIZE_SOURCE_NAME_KEY
public static final String INDEX_RESIZE_SOURCE_NAME_KEY
See Also:
INDEX_ROLLUP_SOURCE_UUID_KEY
public static final String INDEX_ROLLUP_SOURCE_UUID_KEY
See Also:
INDEX_ROLLUP_SOURCE_NAME_KEY
public static final String INDEX_ROLLUP_SOURCE_NAME_KEY
See Also:
Method Details
isSameUUID
public boolean isSameUUID (String otherUUID)
Test whether the current index UUID is the same as the given one. Returns true if either are _na_
getVersion
public long getVersion ()
getMappingVersion
public long getMappingVersion ()
getSettingsVersion
public long getSettingsVersion ()
getAliasesVersion
public long getAliasesVersion ()
primaryTerm
public long primaryTerm (int shardId)
getCreationVersion
public Version getCreationVersion ()
Return the
Version
on which this index has been created. This
information is typically useful for backward compatibility.
getCreationDate
public long getCreationDate ()
getNumberOfShards
public int getNumberOfShards ()
getNumberOfReplicas
public int getNumberOfReplicas ()
getRoutingPartitionSize
public int getRoutingPartitionSize ()
isRoutingPartitionedIndex
public boolean isRoutingPartitionedIndex ()
getTotalNumberOfShards
public int getTotalNumberOfShards ()
ignoreDiskWatermarks
public boolean ignoreDiskWatermarks ()
getShardsPerNodeLimit
public int getShardsPerNodeLimit ()
getLifecycleExecutionState
isSearchableSnapshot
public boolean isSearchableSnapshot ()
isPartialSearchableSnapshot
public boolean isPartialSearchableSnapshot ()
mapping
Return the concrete mapping for this index or null
if this index has no mappings at all.
getResizeSourceIndex
public Index getResizeSourceIndex ()
inSyncAllocationIds
public Set <String > inSyncAllocationIds (int shardId)
getInitialRecoveryFilters
fromXContent
Throws:
IOException
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent (org.elasticsearch.xcontent.XContentBuilder builder,
org.elasticsearch.xcontent.ToXContent.Params params)
throws IOException
Specified by:
toXContent
in interface org.elasticsearch.xcontent.ToXContent
Throws:
IOException
isSystem
public boolean isSystem ()
isHidden
public boolean isHidden ()
priority
public int priority ()
addHumanReadableSettings
Adds human readable version and creation date settings.
This method is used to display the settings in a human readable format in REST API
getRoutingNumShards
public int getRoutingNumShards ()
getRoutingFactor
public int getRoutingFactor ()
Returns the routing factor for this index. The default is 1
.
See Also:
getRoutingFactor
public static int getRoutingFactor (int sourceNumberOfShards,
int targetNumberOfShards)
Parameters:
sourceNumberOfShards
- the total number of shards in the source index
targetNumberOfShards
- the total number of shards in the target index
Returns:
the routing factor for and shrunk index with the given number of target shards.
Throws:
IllegalArgumentException
- if the number of source shards is less than the number of target shards or if the source shards
are not divisible by the number of target shards.
parseIndexNameCounter
public static int parseIndexNameCounter (String indexName)
Parses the number from the rolled over index name. It also supports the date-math format (ie. index name is wrapped in < and >)
E.g.
- For ".ds-logs-000002" it will return 2
- For "<logs-{now/d}-3>" it'll return 3
Throws:
IllegalArgumentException
- if the index doesn't contain a "-" separator or if the last token after the separator is not a
number