public abstract class DocRouter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DocRouter.Range |
Modifier and Type | Field and Description |
---|---|
static DocRouter |
DEFAULT |
static String |
DEFAULT_NAME |
Constructor and Description |
---|
DocRouter() |
Modifier and Type | Method and Description |
---|---|
DocRouter.Range |
fromString(String range) |
DocRouter.Range |
fullRange() |
static DocRouter |
getDocRouter(String routerName) |
protected String |
getRouteField(DocCollection coll) |
static Map<String,Object> |
getRouterSpec(ZkNodeProps props) |
Collection<Slice> |
getSearchSlices(String shardKeys,
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.
|
abstract 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.
|
abstract 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 information
|
abstract boolean |
isTargetSlice(String id,
SolrInputDocument sdoc,
SolrParams params,
String shardId,
DocCollection collection) |
List<DocRouter.Range> |
partitionRange(int partitions,
DocRouter.Range range)
Returns the range for each partition
|
public static final String DEFAULT_NAME
public static final DocRouter DEFAULT
protected String getRouteField(DocCollection coll)
public static Map<String,Object> getRouterSpec(ZkNodeProps props)
public DocRouter.Range fromString(String range)
public DocRouter.Range fullRange()
public List<DocRouter.Range> partitionRange(int partitions, DocRouter.Range range)
public abstract Slice getTargetSlice(String id, SolrInputDocument sdoc, String route, SolrParams params, DocCollection collection)
public abstract Collection<Slice> getSearchSlicesSingle(String shardKey, SolrParams params, DocCollection collection)
public abstract boolean isTargetSlice(String id, SolrInputDocument sdoc, SolrParams params, String shardId, DocCollection collection)
public Collection<Slice> getSearchSlices(String shardKeys, SolrParams params, DocCollection collection)
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.