Module org.elasticsearch.server
Class IndexRouting.ExtractFromSource.ForIndexDimensions
java.lang.Object
org.elasticsearch.cluster.routing.IndexRouting
org.elasticsearch.cluster.routing.IndexRouting.ExtractFromSource
org.elasticsearch.cluster.routing.IndexRouting.ExtractFromSource.ForIndexDimensions
- Enclosing class:
IndexRouting.ExtractFromSource
public static class IndexRouting.ExtractFromSource.ForIndexDimensions
extends IndexRouting.ExtractFromSource
Strategy for time-series indices that use
IndexMetadata.INDEX_DIMENSIONS to extract the tsid from the source.
This strategy avoids double hashing of dimensions during indexing.
It requires that the index was created with IndexVersions.TSID_CREATED_DURING_ROUTING or later.
It creates the tsid during routing and makes the routing decision based on the tsid.
The tsid gets attached to the index request so that the data node can reuse it instead of rebuilding it.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.cluster.routing.IndexRouting.ExtractFromSource
IndexRouting.ExtractFromSource.ForIndexDimensions, IndexRouting.ExtractFromSource.ForRoutingPathNested classes/interfaces inherited from class org.elasticsearch.cluster.routing.IndexRouting
IndexRouting.ExtractFromSource -
Field Summary
Fields inherited from class org.elasticsearch.cluster.routing.IndexRouting.ExtractFromSource
parserConfigFields inherited from class org.elasticsearch.cluster.routing.IndexRouting
indexName -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.util.BytesRefbuildTsid(XContentType sourceType, BytesReference source) protected inthashSource(IndexRequest indexRequest) Methods inherited from class org.elasticsearch.cluster.routing.IndexRouting.ExtractFromSource
checkIndexSplitAllowed, collectSearchShards, deleteShard, getShard, hash, indexShard, postProcess, updateShardMethods inherited from class org.elasticsearch.cluster.routing.IndexRouting
fromIndexMetadata, hashToShardId, preProcess, rerouteSearchIfResharding, rerouteWritesIfResharding
-
Method Details
-
hashSource
- Specified by:
hashSourcein classIndexRouting.ExtractFromSource
-
buildTsid
-