org.apache.solr.common.cloud
Class CompositeIdRouter

java.lang.Object
  extended by org.apache.solr.common.cloud.DocRouter
      extended by org.apache.solr.common.cloud.HashBasedRouter
          extended by org.apache.solr.common.cloud.CompositeIdRouter

public class CompositeIdRouter
extends HashBasedRouter


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.solr.common.cloud.DocRouter
DocRouter.Range
 
Field Summary
static String NAME
           
 
Fields inherited from class org.apache.solr.common.cloud.DocRouter
DEFAULT, DEFAULT_NAME
 
Constructor Summary
CompositeIdRouter()
           
 
Method Summary
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.
 List<DocRouter.Range> partitionRange(int partitions, DocRouter.Range range)
          Returns the range for each partition
protected  void setBits(int firstBits)
           
 int sliceHash(String id, SolrInputDocument doc, SolrParams params, DocCollection collection)
           
 
Methods inherited from class org.apache.solr.common.cloud.HashBasedRouter
getId, getTargetSlice, hashToSlice, isTargetSlice
 
Methods inherited from class org.apache.solr.common.cloud.DocRouter
fromString, fullRange, getDocRouter, getRouteField, getRouterSpec, getSearchSlices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values
Constructor Detail

CompositeIdRouter

public CompositeIdRouter()
Method Detail

setBits

protected void setBits(int firstBits)

getBits

protected int getBits(String firstPart,
                      int commaIdx)

sliceHash

public int sliceHash(String id,
                     SolrInputDocument doc,
                     SolrParams params,
                     DocCollection collection)
Overrides:
sliceHash in class HashBasedRouter

getSearchSlicesSingle

public Collection<Slice> getSearchSlicesSingle(String shardKey,
                                               SolrParams params,
                                               DocCollection collection)
Description copied from class: DocRouter
This method is consulted to determine what slices should be queried for a request when an explicit shards parameter was not used. This method only accepts a single shard key (or null). If you have a comma separated list of shard keys, call getSearchSlices

Overrides:
getSearchSlicesSingle in class HashBasedRouter

partitionRange

public List<DocRouter.Range> partitionRange(int partitions,
                                            DocRouter.Range range)
Description copied from class: DocRouter
Returns the range for each partition

Overrides:
partitionRange in class DocRouter


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.