public abstract class HashBasedRouter extends DocRouter
DocRouter.Range
DEFAULT, DEFAULT_NAME
Constructor and Description |
---|
HashBasedRouter() |
Modifier and Type | Method and Description |
---|---|
protected String |
getId(SolrInputDocument sdoc,
SolrParams params) |
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,
SolrParams params,
DocCollection collection)
Returns the Slice that the document should reside on, or null if there is not enough information
|
protected Slice |
hashToSlice(int hash,
DocCollection collection) |
boolean |
isTargetSlice(String id,
SolrInputDocument sdoc,
SolrParams params,
String shardId,
DocCollection collection) |
int |
sliceHash(String id,
SolrInputDocument sdoc,
SolrParams params,
DocCollection collection) |
fromString, fullRange, getDocRouter, getRouteField, getRouterSpec, getSearchSlices, partitionRange
public Slice getTargetSlice(String id, SolrInputDocument sdoc, SolrParams params, DocCollection collection)
DocRouter
getTargetSlice
in class DocRouter
public boolean isTargetSlice(String id, SolrInputDocument sdoc, SolrParams params, String shardId, DocCollection collection)
isTargetSlice
in class DocRouter
public int sliceHash(String id, SolrInputDocument sdoc, SolrParams params, DocCollection collection)
protected String getId(SolrInputDocument sdoc, SolrParams params)
protected Slice hashToSlice(int hash, DocCollection collection)
public Collection<Slice> getSearchSlicesSingle(String shardKey, SolrParams params, DocCollection collection)
DocRouter
getSearchSlicesSingle
in class DocRouter
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.