public class CompositeIdRouter extends HashBasedRouter
DocRouter.Range
Modifier and Type | Field and Description |
---|---|
static int |
bitsSeparator |
static String |
NAME |
static int |
separator |
DEFAULT, DEFAULT_NAME
Constructor and Description |
---|
CompositeIdRouter() |
Modifier and Type | Method and Description |
---|---|
protected int |
getBits(String firstPart,
int commaIdx) |
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) |
List<DocRouter.Range> |
partitionRange(int partitions,
DocRouter.Range range)
Returns the range for each partition
|
List<DocRouter.Range> |
partitionRangeByKey(String key,
DocRouter.Range range) |
protected void |
setBits(int firstBits) |
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 int separator
public static final int bitsSeparator
protected void setBits(int firstBits)
protected int getBits(String firstPart, int commaIdx)
public int sliceHash(String id, SolrInputDocument doc, SolrParams params, DocCollection collection)
sliceHash
in class HashBasedRouter
public DocRouter.Range keyHashRange(String routeKey)
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
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.