org.apache.solr.handler.component

## 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 and Description
    --- | ---
    `static class` | `IterativeMergeStrategy.CallBack`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ExecutorService` | `executorService`
    `protected static org.apache.http.client.HttpClient` | `httpClient`

    - ### Fields inherited from interface org.apache.solr.handler.component.MergeStrategy

      `MERGE_COMP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IterativeMergeStrategy()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<Future<IterativeMergeStrategy.CallBack>>` | `callBack(List<ShardResponse> responses, QueryRequest req)`
    `Future<IterativeMergeStrategy.CallBack>` | `callBack(ShardResponse response, 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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### executorService

          protected ExecutorService executorService

    - #### httpClient

          protected static org.apache.http.client.HttpClient httpClient

  - ### Constructor Detail

    - #### IterativeMergeStrategy

          public IterativeMergeStrategy()

  - ### 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 interface `MergeStrategy`

    - #### 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 interface `MergeStrategy`

    - #### 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 interface `MergeStrategy`

    - #### 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 interface `MergeStrategy`

    - #### 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 interface `MergeStrategy`

    - #### callBack

          public List<Future<IterativeMergeStrategy.CallBack>> callBack(List<ShardResponse> responses,
                                                                        QueryRequest req)

    - #### callBack

          public Future<IterativeMergeStrategy.CallBack> callBack(ShardResponse response,
                                                                  QueryRequest req)

    - #### process

          protected abstract void process(ResponseBuilder rb,
                                          ShardRequest sreq)
                                   throws Exception

      Throws:
        `Exception`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.