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 |
---|---|
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)
Returns the range for each partition
|
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
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 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
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.