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:
java.io.Serializable, java.lang.Comparable<IndexWriterSetting>

public enum IndexWriterSetting
extends java.lang.Enum<IndexWriterSetting>
implements java.io.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
           
MAX_MERGE_DOCS
           
MERGE_FACTOR
           
RAM_BUFFER_SIZE
           
TERM_INDEX_INTERVAL
           
USE_COMPOUND_FILE
           
 
Method Summary
abstract  void applySetting(org.apache.lucene.index.IndexWriter writer, int value)
           
 java.lang.String getKey()
           
 java.lang.Integer parseVal(java.lang.String value)
          Specific parameters may override to provide additional keywords support.
static IndexWriterSetting valueOf(java.lang.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:
IndexWriter.setMaxBufferedDeleteTerms(int)

MAX_BUFFERED_DOCS

public static final IndexWriterSetting MAX_BUFFERED_DOCS
See Also:
IndexWriter.setMaxBufferedDocs(int)

MAX_FIELD_LENGTH

public static final IndexWriterSetting MAX_FIELD_LENGTH
See Also:
IndexWriter.setMaxFieldLength(int)

MAX_MERGE_DOCS

public static final IndexWriterSetting MAX_MERGE_DOCS
See Also:
IndexWriter.setMaxMergeDocs(int)

MERGE_FACTOR

public static final IndexWriterSetting MERGE_FACTOR
See Also:
IndexWriter.setMergeFactor(int)

RAM_BUFFER_SIZE

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

TERM_INDEX_INTERVAL

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

USE_COMPOUND_FILE

public static final IndexWriterSetting USE_COMPOUND_FILE
See Also:
IndexWriter.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(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

applySetting

public abstract void applySetting(org.apache.lucene.index.IndexWriter writer,
                                  int value)
Throws:
java.lang.IllegalArgumentException - when user selects an invalid value; should be wrapped.

getKey

public java.lang.String getKey()
Returns:
The key used in configuration files to select an option.

parseVal

public java.lang.Integer parseVal(java.lang.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-2010 Hibernate. All Rights Reserved.