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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Defines the order that the mergeStrategies are applied.
    void
    Implement handleMergeFields(ResponseBuilder rb, SolrIndexSearch searcher) if your merge strategy needs more complex data then the sort fields provide.
    boolean
    handlesMergeFields must return true if the MergeStrategy implements a custom handleMergeFields(ResponseBuilder rb, SolrIndexSearch searcher)
    void
    merge defines the merging behaving of results that are collected from the shards during a distributed search.
    boolean
    mergesIds must return true if the merge method merges document ids from the shards.
  • Field Details

  • Method Details

    • 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.