Module org.elasticsearch.server
Class IndexRouting.ExtractFromSource
java.lang.Object
org.elasticsearch.cluster.routing.IndexRouting
org.elasticsearch.cluster.routing.IndexRouting.ExtractFromSource
- Enclosing class:
IndexRouting
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.cluster.routing.IndexRouting
IndexRouting.ExtractFromSource -
Field Summary
Fields inherited from class org.elasticsearch.cluster.routing.IndexRouting
indexName -
Method Summary
Modifier and TypeMethodDescriptionbuilder()voidCheck if the _split index operation is allowed for an indexvoidcollectSearchShards(String routing, IntConsumer consumer) Collect all of the shard ids that *may* contain documents with the providedrouting.createId(XContentType sourceType, BytesReference source, byte[] suffix) intdeleteShard(String id, String routing) Called when deleting a document to generate the shard id that should contain a document with the provided_idand (optional)_routing.intCalled when getting a document to generate the shard id that should contain a document with the provided_idand (optional)_routing.intindexShard(String id, String routing, XContentType sourceType, BytesReference source) Called when indexing a document to generate the shard id that should contain a document with the provided parameters.booleanmatchesField(String fieldName) voidpostProcess(IndexRequest indexRequest) Finalize the request after routing, incorporating data produced by the routing logic.intupdateShard(String id, String routing) Called when updating a document to generate the shard id that should contain a document with the provided_idand (optional)_routing.Methods inherited from class org.elasticsearch.cluster.routing.IndexRouting
fromIndexMetadata, hashToShardId, preProcess
-
Method Details
-
matchesField
-
postProcess
Description copied from class:IndexRoutingFinalize the request after routing, incorporating data produced by the routing logic.- Overrides:
postProcessin classIndexRouting
-
indexShard
public int indexShard(String id, @Nullable String routing, XContentType sourceType, BytesReference source) Description copied from class:IndexRoutingCalled when indexing a document to generate the shard id that should contain a document with the provided parameters.- Specified by:
indexShardin classIndexRouting
-
createId
-
createId
-
builder
-
updateShard
Description copied from class:IndexRoutingCalled when updating a document to generate the shard id that should contain a document with the provided_idand (optional)_routing.- Specified by:
updateShardin classIndexRouting
-
deleteShard
Description copied from class:IndexRoutingCalled when deleting a document to generate the shard id that should contain a document with the provided_idand (optional)_routing.- Specified by:
deleteShardin classIndexRouting
-
getShard
Description copied from class:IndexRoutingCalled when getting a document to generate the shard id that should contain a document with the provided_idand (optional)_routing.- Specified by:
getShardin classIndexRouting
-
checkIndexSplitAllowed
public void checkIndexSplitAllowed()Description copied from class:IndexRoutingCheck if the _split index operation is allowed for an index- Overrides:
checkIndexSplitAllowedin classIndexRouting
-
collectSearchShards
Description copied from class:IndexRoutingCollect all of the shard ids that *may* contain documents with the providedrouting. Indices with arouting_partitionwill collect more than one shard. Indices without a partition will collect the same shard id as would be returned byIndexRouting.getShard(java.lang.String, java.lang.String).Note: This is called for any search-like requests that have a routing specified but only if they have a routing specified. If they do not have a routing they just use all shards in the index.
- Specified by:
collectSearchShardsin classIndexRouting
-