Interface MergeStrategy
- All Known Implementing Classes:
IterativeMergeStrategy
public interface MergeStrategy
The MergeStrategy class defines custom merge logic for distributed searches.
Note: This API is experimental and may change in non backward-compatible ways in the future
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintgetCost()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.
-
Field Details
-
MERGE_COMP
-
-
Method Details
-
merge
merge defines the merging behaving of results that are collected from the shards during a distributed search. -
mergesIds
boolean mergesIds()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. -
handlesMergeFields
boolean handlesMergeFields()handlesMergeFields must return true if the MergeStrategy implements a custom handleMergeFields(ResponseBuilder rb, SolrIndexSearch searcher) -
handleMergeFields
Implement handleMergeFields(ResponseBuilder rb, SolrIndexSearch searcher) if your merge strategy needs more complex data then the sort fields provide.- Throws:
IOException
-
getCost
int getCost()Defines the order that the mergeStrategies are applied. Lower costs are applied first.
-