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.
public static finalStringSETTING_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)
Return the Version on which this index has been created. This
information is typically useful for backward compatibility.
To check index compatibility (e.g. N-1 checks), use getCompatibilityVersion() instead.
Return the Version that this index provides compatibility for.
This is typically compared to the Version.minimumIndexCompatibilityVersion() to figure out whether the index can be handled
by the cluster.
By default, this is equal to the getCreationVersion(), but can also be a newer version if the index has been imported as
a legacy index from an older snapshot, and its metadata has been converted to be handled by newer version nodes.
If this index is in IndexMode.TIME_SERIES then this returns the lower boundary of the time series time range.
Together with getTimeSeriesEnd() this defines the time series time range this index has and the range of
timestamps all documents in this index have.
Returns:
If this index is in IndexMode.TIME_SERIES then this returns the lower boundary of the time series time range.
If this index isn't in IndexMode.TIME_SERIES then null is returned.
If this index is in IndexMode.TIME_SERIES then this returns the upper boundary of the time series time range.
Together with getTimeSeriesStart() this defines the time series time range this index has and the range of
timestamps all documents in this index have.
Returns:
If this index is in IndexMode.TIME_SERIES then this returns the upper boundary of the time series time range.
If this index isn't in IndexMode.TIME_SERIES then null is returned.
mappingLookup - optional lookup function that translates mapping metadata hashes into concrete instances. If specified we
assume that the stream contains only mapping metadata hashes but not fully serialized instances of mapping
metadata.
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 staticintparseIndexNameCounter(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