Class IterativeMergeStrategy
- java.lang.Object
-
- org.apache.solr.handler.component.IterativeMergeStrategy
-
- All Implemented Interfaces:
MergeStrategy
public abstract class IterativeMergeStrategy extends Object implements MergeStrategy
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
IterativeMergeStrategy.CallBack
-
Field Summary
Fields Modifier and Type Field Description protected ExecutorService
executorService
protected org.apache.http.impl.client.CloseableHttpClient
httpClient
-
Fields inherited from interface org.apache.solr.handler.component.MergeStrategy
MERGE_COMP
-
-
Constructor Summary
Constructors Constructor Description IterativeMergeStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description List<Future<IterativeMergeStrategy.CallBack>>
callBack(List<ShardResponse> responses, org.apache.solr.client.solrj.request.QueryRequest req)
Future<IterativeMergeStrategy.CallBack>
callBack(ShardResponse response, org.apache.solr.client.solrj.request.QueryRequest req)
int
getCost()
Defines the order that the mergeStrategies are applied.void
handleMergeFields(ResponseBuilder rb, SolrIndexSearcher searcher)
Implement handleMergeFields(ResponseBuilder rb, SolrIndexSearch searcher) if your merge strategy needs more complex data then the sort fields provide.boolean
handlesMergeFields()
handlesMergeFields must return true if the MergeStrategy implements a custom handleMergeFields(ResponseBuilder rb, SolrIndexSearch searcher)void
merge(ResponseBuilder rb, ShardRequest sreq)
merge defines the merging behaving of results that are collected from the shards during a distributed search.boolean
mergesIds()
mergesIds must return true if the merge method merges document ids from the shards.protected abstract void
process(ResponseBuilder rb, ShardRequest sreq)
-
-
-
Field Detail
-
executorService
protected volatile ExecutorService executorService
-
httpClient
protected volatile org.apache.http.impl.client.CloseableHttpClient httpClient
-
-
Method Detail
-
merge
public void merge(ResponseBuilder rb, ShardRequest sreq)
Description copied from interface:MergeStrategy
merge defines the merging behaving of results that are collected from the shards during a distributed search.- Specified by:
merge
in interfaceMergeStrategy
-
mergesIds
public boolean mergesIds()
Description copied from interface:MergeStrategy
mergesIds must return true if the merge method merges document ids from the shards. If it merges other output from the shards it must return false.- Specified by:
mergesIds
in interfaceMergeStrategy
-
getCost
public int getCost()
Description copied from interface:MergeStrategy
Defines the order that the mergeStrategies are applied. Lower costs are applied first.- Specified by:
getCost
in interfaceMergeStrategy
-
handlesMergeFields
public boolean handlesMergeFields()
Description copied from interface:MergeStrategy
handlesMergeFields must return true if the MergeStrategy implements a custom handleMergeFields(ResponseBuilder rb, SolrIndexSearch searcher)- Specified by:
handlesMergeFields
in interfaceMergeStrategy
-
handleMergeFields
public void handleMergeFields(ResponseBuilder rb, SolrIndexSearcher searcher)
Description copied from interface:MergeStrategy
Implement handleMergeFields(ResponseBuilder rb, SolrIndexSearch searcher) if your merge strategy needs more complex data then the sort fields provide.- Specified by:
handleMergeFields
in interfaceMergeStrategy
-
callBack
public List<Future<IterativeMergeStrategy.CallBack>> callBack(List<ShardResponse> responses, org.apache.solr.client.solrj.request.QueryRequest req)
-
callBack
public Future<IterativeMergeStrategy.CallBack> callBack(ShardResponse response, org.apache.solr.client.solrj.request.QueryRequest req)
-
process
protected abstract void process(ResponseBuilder rb, ShardRequest sreq) throws Exception
- Throws:
Exception
-
-