org.hibernate.search.backend.configuration
Enum IndexWriterSetting

java.lang.Object
  extended by java.lang.Enum<IndexWriterSetting>
      extended by org.hibernate.search.backend.configuration.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
MAX_BUFFERED_DELETE_TERMS
           
MAX_BUFFERED_DOCS
           
MAX_FIELD_LENGTH
          Deprecated.  
MAX_MERGE_DOCS
           
MERGE_FACTOR
           
RAM_BUFFER_SIZE
           
TERM_INDEX_INTERVAL
           
USE_COMPOUND_FILE
           
 
Method Summary
 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_FIELD_LENGTH

public static final IndexWriterSetting MAX_FIELD_LENGTH
Deprecated. 
No longer applied - use a LimitTokenCountAnalyzer.

See Also:
LimitTokenCountAnalyzer

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)

RAM_BUFFER_SIZE

public static final IndexWriterSetting RAM_BUFFER_SIZE
See Also:
IndexWriterConfig.setRAMBufferSizeMB(double)

TERM_INDEX_INTERVAL

public static final IndexWriterSetting TERM_INDEX_INTERVAL
See Also:
IndexWriterConfig.setTermIndexInterval(int)

USE_COMPOUND_FILE

public static final IndexWriterSetting USE_COMPOUND_FILE
See Also:
LogMergePolicy.setUseCompoundFile(boolean)
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)
Throws:
IllegalArgumentException - when user selects an invalid value; should be wrapped.

applySetting

public void applySetting(LogByteSizeMergePolicy logByteSizeMergePolicy,
                         int value)
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-2012 Red Hat Middleware, LLC. All Rights Reserved