org.hibernate.search.elasticsearch.work.impl

## Class ES2OptimizeWork

- java.lang.Object
- - org.hibernate.search.elasticsearch.work.impl.SimpleElasticsearchWork<Void>
  - - org.hibernate.search.elasticsearch.work.impl.ES2OptimizeWork

- All Implemented Interfaces:
    ElasticsearchWork<Void>

      public class ES2OptimizeWork
      extends SimpleElasticsearchWork<Void>

  An optimize work for ES2, using the Optimize API.

  The Optimize API has been deprecated in 2.1 in favor of the ForceMerge API, but it still works on every 2.x version and we want this work to be compatible with ES2.0 too.

  Author:
    Yoann Rodiere

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ES2OptimizeWork.Builder`

  - ### Field Summary

    - ### Fields inherited from class org.hibernate.search.elasticsearch.work.impl.SimpleElasticsearchWork

      `dirtiedIndexName, markIndexDirty, request, resultAssessor`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ES2OptimizeWork(ES2OptimizeWork.Builder builder)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Void` | `generateResult(ElasticsearchWorkExecutionContext context, ElasticsearchResponse response)`

    - ### Methods inherited from class org.hibernate.search.elasticsearch.work.impl.SimpleElasticsearchWork

      `afterSuccess, aggregate, beforeExecute, execute, getLuceneWork, toString`

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

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

- - ### Constructor Detail

    - #### ES2OptimizeWork

          protected ES2OptimizeWork(ES2OptimizeWork.Builder builder)

  - ### Method Detail

    - #### generateResult

          protected Void generateResult(ElasticsearchWorkExecutionContext context,
                                        ElasticsearchResponse response)

      Specified by:
        `generateResult` in class `SimpleElasticsearchWork<Void>`

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved