org.hibernate.search.backend.configuration.impl

## Enum IndexWriterSetting

- java.lang.Object
- - java.lang.Enum<IndexWriterSetting>
  - - org.hibernate.search.backend.configuration.impl.IndexWriterSetting

- All Implemented Interfaces:
    Serializable, Comparable<IndexWriterSetting>

      public enum IndexWriterSetting
      extends Enum<IndexWriterSetting>
      implements Serializable

  Represents possible options to be applied to an `org.apache.lucene.index.IndexWriter`.
  Author:
    Sanne Grinovero

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `INFOSTREAM`
    `MAX_BUFFERED_DELETE_TERMS`
    `MAX_BUFFERED_DOCS`
    `MAX_MERGE_DOCS`
    `MAX_THREAD_STATES` Deprecated.
    `MERGE_CALIBRATE_BY_DELETES`
    `MERGE_FACTOR`
    `MERGE_MAX_OPTIMIZE_SIZE`
    `MERGE_MAX_SIZE`
    `MERGE_MIN_SIZE`
    `RAM_BUFFER_SIZE`
    `TERM_INDEX_INTERVAL` Deprecated.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `applySetting(IndexWriterConfig writerConfig, int value)`
    `void` | `applySetting(LogByteSizeMergePolicy logByteSizeMergePolicy, int value)`
    `String` | `getKey()`
    `Integer` | `parseVal(String value)` Specific parameters may override to provide additional keywords support.
    `static IndexWriterSetting` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static IndexWriterSetting[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### MAX_BUFFERED_DELETE_TERMS

          public static final IndexWriterSetting MAX_BUFFERED_DELETE_TERMS

      See Also:
        `IndexWriterConfig.setMaxBufferedDeleteTerms(int)`

    - #### MAX_BUFFERED_DOCS

          public static final IndexWriterSetting MAX_BUFFERED_DOCS

      See Also:
        `IndexWriterConfig.setMaxBufferedDocs(int)`

    - #### MAX_MERGE_DOCS

          public static final IndexWriterSetting MAX_MERGE_DOCS

      See Also:
        `LogMergePolicy.setMaxMergeDocs(int)`

    - #### MERGE_FACTOR

          public static final IndexWriterSetting MERGE_FACTOR

      See Also:
        `LogMergePolicy.setMergeFactor(int)`

    - #### MERGE_MIN_SIZE

          public static final IndexWriterSetting MERGE_MIN_SIZE

      See Also:
        `LogByteSizeMergePolicy.setMinMergeMB(double)`

    - #### MERGE_MAX_SIZE

          public static final IndexWriterSetting MERGE_MAX_SIZE

      See Also:
        `LogByteSizeMergePolicy.setMaxMergeMB(double)`

    - #### MERGE_MAX_OPTIMIZE_SIZE

          public static final IndexWriterSetting MERGE_MAX_OPTIMIZE_SIZE

      See Also:
        `LogByteSizeMergePolicy.setMaxMergeMBForForcedMerge(double)`

    - #### MERGE_CALIBRATE_BY_DELETES

          public static final IndexWriterSetting MERGE_CALIBRATE_BY_DELETES

      See Also:
        `LogMergePolicy.setCalibrateSizeByDeletes(boolean)`

    - #### RAM_BUFFER_SIZE

          public static final IndexWriterSetting RAM_BUFFER_SIZE

      See Also:
        `IndexWriterConfig.setRAMBufferSizeMB(double)`

    - #### TERM_INDEX_INTERVAL

          @Deprecated
          public static final IndexWriterSetting TERM_INDEX_INTERVAL

      Deprecated.

    - #### MAX_THREAD_STATES

          @Deprecated
          public static final IndexWriterSetting MAX_THREAD_STATES

      Deprecated.

    - #### INFOSTREAM

          public static final IndexWriterSetting INFOSTREAM

      See Also:
        `IndexWriterConfig.setInfoStream(org.apache.lucene.util.InfoStream)`

  - ### Method Detail

    - #### values

          public static IndexWriterSetting[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (IndexWriterSetting c : IndexWriterSetting.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static IndexWriterSetting valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### applySetting

          public void applySetting(IndexWriterConfig writerConfig,
                                   int value)

      Parameters:
        `writerConfig` - the `IndexWriterConfig`
        `value` - the value for the configuration
      Throws:
        `IllegalArgumentException` - when user selects an invalid value; should be wrapped.

    - #### applySetting

          public void applySetting(LogByteSizeMergePolicy logByteSizeMergePolicy,
                                   int value)

      Parameters:
        `logByteSizeMergePolicy` - the `LogByteSizeMergePolicy`
        `value` - the value for the configuration
      Throws:
        `IllegalArgumentException` - when user selects an invalid value; should be wrapped.

    - #### getKey

          public String getKey()

      Returns:
        The key used in configuration files to select an option.

    - #### parseVal

          public Integer parseVal(String value)

      Specific parameters may override to provide additional keywords support.
      Parameters:
        `value` - the string value as in configuration file
      Returns:
        the integer value going to be set as parameter
      Throws:
        `SearchException` - for unrecognized values

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