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 Modifier and Type Field Description static Comparator<MergeStrategy>
MERGE_COMP
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.
-
-
-
Field Detail
-
MERGE_COMP
static final Comparator<MergeStrategy> MERGE_COMP
-
-
Method Detail
-
merge
void merge(ResponseBuilder rb, ShardRequest sreq)
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
void handleMergeFields(ResponseBuilder rb, SolrIndexSearcher searcher) throws IOException
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.
-
-