Class DocRouter

  • Direct Known Subclasses:
    HashBasedRouter, ImplicitDocRouter

    public abstract class DocRouter
    extends Object
    Class to partition int range into n ranges.
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Constructor Detail

      • DocRouter

        public DocRouter()
    • Method Detail

      • getDocRouter

        public static DocRouter getDocRouter​(String routerName)
      • getSearchSlicesSingle

        public 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. This method only accepts a single shard key (or null). If you have a comma separated list of shard keys, call getSearchSlices
      • getSearchSlices

        public 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. This method accepts a multi-valued shardKeys parameter (normally comma separated from the shard.keys request parameter) and aggregates the slices returned by getSearchSlicesSingle for each shardKey.