Class IterativeMergeStrategy
java.lang.Object
org.apache.solr.handler.component.IterativeMergeStrategy
- All Implemented Interfaces:
MergeStrategy
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface org.apache.solr.handler.component.MergeStrategy
MERGE_COMP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncallBack(List<ShardResponse> responses, org.apache.solr.client.solrj.request.QueryRequest req) callBack(ShardResponse response, org.apache.solr.client.solrj.request.QueryRequest req) intgetCost()Defines the order that the mergeStrategies are applied.voidhandleMergeFields(ResponseBuilder rb, SolrIndexSearcher searcher) Implement handleMergeFields(ResponseBuilder rb, SolrIndexSearch searcher) if your merge strategy needs more complex data then the sort fields provide.booleanhandlesMergeFields must return true if the MergeStrategy implements a custom handleMergeFields(ResponseBuilder rb, SolrIndexSearch searcher)voidmerge(ResponseBuilder rb, ShardRequest sreq) merge defines the merging behaving of results that are collected from the shards during a distributed search.booleanmergesIds must return true if the merge method merges document ids from the shards.protected abstract voidprocess(ResponseBuilder rb, ShardRequest sreq)
-
Field Details
-
executorService
-
httpSolrClient
-
-
Constructor Details
-
IterativeMergeStrategy
public IterativeMergeStrategy()
-
-
Method Details
-
merge
Description copied from interface:MergeStrategymerge defines the merging behaving of results that are collected from the shards during a distributed search.- Specified by:
mergein interfaceMergeStrategy
-
mergesIds
public boolean mergesIds()Description copied from interface:MergeStrategymergesIds 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:
mergesIdsin interfaceMergeStrategy
-
getCost
public int getCost()Description copied from interface:MergeStrategyDefines the order that the mergeStrategies are applied. Lower costs are applied first.- Specified by:
getCostin interfaceMergeStrategy
-
handlesMergeFields
public boolean handlesMergeFields()Description copied from interface:MergeStrategyhandlesMergeFields must return true if the MergeStrategy implements a custom handleMergeFields(ResponseBuilder rb, SolrIndexSearch searcher)- Specified by:
handlesMergeFieldsin interfaceMergeStrategy
-
handleMergeFields
Description copied from interface:MergeStrategyImplement handleMergeFields(ResponseBuilder rb, SolrIndexSearch searcher) if your merge strategy needs more complex data then the sort fields provide.- Specified by:
handleMergeFieldsin 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
- Throws:
Exception
-