public class CompositeIdRouter extends HashBasedRouter
DocRouter.Range
Modifier and Type | Field and Description |
---|---|
static int |
bitsSeparator |
static String |
NAME |
static String |
SEPARATOR |
DEFAULT, DEFAULT_NAME
Constructor and Description |
---|
CompositeIdRouter() |
Modifier and Type | Method and Description |
---|---|
String |
getName() |
DocRouter.Range |
getSearchRangeSingle(String shardKey,
SolrParams params,
DocCollection collection)
This method is consulted to determine what search range (the part of the hash ring) should be queried for a request when
an explicit shards parameter was not used.
|
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.
|
DocRouter.Range |
keyHashRange(String routeKey)
Get Range for a given CompositeId based route key
|
List<DocRouter.Range> |
partitionRange(int partitions,
DocRouter.Range range)
Split the range into partitions.
|
List<DocRouter.Range> |
partitionRangeByKey(String key,
DocRouter.Range range) |
int |
sliceHash(String id,
SolrInputDocument doc,
SolrParams params,
DocCollection collection) |
getId, getTargetSlice, hashToSlice, isTargetSlice
fromString, fullRange, getDocRouter, getRouteField, getRouterSpec, getSearchSlices, partitionRange
public static final String NAME
public static final String SEPARATOR
public static final int bitsSeparator
public int sliceHash(String id, SolrInputDocument doc, SolrParams params, DocCollection collection)
sliceHash
in class HashBasedRouter
public DocRouter.Range keyHashRange(String routeKey)
routeKey
- to return Range forpublic DocRouter.Range getSearchRangeSingle(String shardKey, SolrParams params, DocCollection collection)
DocRouter
getSearchRangeSingle
in class DocRouter
public Collection<Slice> getSearchSlicesSingle(String shardKey, SolrParams params, DocCollection collection)
DocRouter
getSearchSlicesSingle
in class HashBasedRouter
public List<DocRouter.Range> partitionRangeByKey(String key, DocRouter.Range range)
public List<DocRouter.Range> partitionRange(int partitions, DocRouter.Range range)
DocRouter
partitionRange
in class DocRouter
partitions
- number of partitionsrange
- range to splitCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.