Module org.elasticsearch.server
Class IndexRouting.ExtractFromSource.ForRoutingPath
java.lang.Object
org.elasticsearch.cluster.routing.IndexRouting
org.elasticsearch.cluster.routing.IndexRouting.ExtractFromSource
org.elasticsearch.cluster.routing.IndexRouting.ExtractFromSource.ForRoutingPath
- Enclosing class:
IndexRouting.ExtractFromSource
public static class IndexRouting.ExtractFromSource.ForRoutingPath
extends IndexRouting.ExtractFromSource
Strategy for indices that use
IndexMetadata.INDEX_ROUTING_PATH to extract the routing value from the source.
This is used primarily for time-series indices created before IndexVersions.TSID_CREATED_DURING_ROUTING
and for LogsDB indices that route on specific fields.
For time-series indices this strategy will result in dimensions to be extracted and hashed twice during indexing:
once in the coordinating node during shard routing and then again in the data node to create the tsid during document parsing.
The IndexRouting.ExtractFromSource.ForIndexDimensions strategy avoids this double hashing.-
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 TypeMethodDescriptionbuilder()createId(XContentType sourceType, BytesReference source, byte[] suffix) protected inthashSource(IndexRequest indexRequest) booleanmatchesField(String fieldName) 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
-
createId
-
builder
-
matchesField
-