Package org.apache.solr.common.cloud
Class ImplicitDocRouter
- java.lang.Object
-
- org.apache.solr.common.cloud.DocRouter
-
- org.apache.solr.common.cloud.ImplicitDocRouter
-
public class ImplicitDocRouter extends DocRouter
This document router is for custom sharding
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.common.cloud.DocRouter
DocRouter.Range
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAME
-
Fields inherited from class org.apache.solr.common.cloud.DocRouter
DEFAULT, DEFAULT_NAME
-
-
Constructor Summary
Constructors Constructor Description ImplicitDocRouter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
Collection<Slice>
getSearchSlicesSingle(String shardKey, SolrParams params, DocCollection collection)
This method is consulted to determine what slices should be queried for a request when an explicit shards parameter was not used.Slice
getTargetSlice(String id, SolrInputDocument sdoc, String route, SolrParams params, DocCollection collection)
Returns the Slice that the document should reside on, or null if there is not enough informationboolean
isTargetSlice(String id, SolrInputDocument sdoc, SolrParams params, String shardId, DocCollection collection)
List<DocRouter.Range>
partitionRange(int partitions, DocRouter.Range range)
Split the range into partitions.-
Methods inherited from class org.apache.solr.common.cloud.DocRouter
fromString, fullRange, getDocRouter, getRouteField, getRouterSpec, getSearchRangeSingle, getSearchSlices, partitionRange
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTargetSlice
public Slice getTargetSlice(String id, SolrInputDocument sdoc, String route, SolrParams params, DocCollection collection)
Description copied from class:DocRouter
Returns the Slice that the document should reside on, or null if there is not enough information- Specified by:
getTargetSlice
in classDocRouter
-
isTargetSlice
public boolean isTargetSlice(String id, SolrInputDocument sdoc, SolrParams params, String shardId, DocCollection collection)
- Specified by:
isTargetSlice
in classDocRouter
-
getSearchSlicesSingle
public Collection<Slice> getSearchSlicesSingle(String shardKey, SolrParams params, DocCollection collection)
Description copied from class:DocRouter
This method is consulted to determine what slices should be queried for a request when an explicit shards parameter was not used. This method only accepts a single shard key (or null). If you have a comma separated list of shard keys, call getSearchSlices- Specified by:
getSearchSlicesSingle
in classDocRouter
-
partitionRange
public List<DocRouter.Range> partitionRange(int partitions, DocRouter.Range range)
Description copied from class:DocRouter
Split the range into partitions.- Overrides:
partitionRange
in classDocRouter
- Parameters:
partitions
- number of partitionsrange
- range to split
-
-