org.compass.core.lucene
Class LuceneEnvironment.SearchEngineIndex

java.lang.Object
  extended by org.compass.core.lucene.LuceneEnvironment.SearchEngineIndex
Enclosing class:
LuceneEnvironment

public abstract static class LuceneEnvironment.SearchEngineIndex
extends Object

Specific environment settings for the batch_insert settings.


Field Summary
static String CACHE_INTERVAL_INVALIDATION
          Sets how often (in milliseconds) the index manager will check if the index cache needs to be invalidated.
static String INDEX_MANAGER_SCHEDULE_INTERVAL
          The index manager schedule interval (in seconds) where different actions related to index manager will happen (such as global cache interval checks.
static String MAX_BUFFERED_DOCS
          Determines the minimal number of documents required before the buffered in-memory documents are merging and a new Segment is created.
static String MAX_FIELD_LENGTH
          The maximum number of terms that will be indexed for a single field in a document.
static String MAX_MERGE_DOCS
          Determines the largest number of documents ever merged by addDocument().
static String MERGE_FACTOR
          Determines how often segment indices are merged by addDocument().
static String USE_COMPOUND_FILE
          Setting to turn on usage of a compound file.
static String WAIT_FOR_CACHE_INVALIDATION_ON_INDEX_OPERATION
          Defaults to false.
 
Constructor Summary
LuceneEnvironment.SearchEngineIndex()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_MERGE_DOCS

public static final String MAX_MERGE_DOCS
Determines the largest number of documents ever merged by addDocument(). Small values (e.g., less than 10,000) are best for interactive indexing, as this limits the length of pauses while indexing to a few seconds. Larger values are best for batched indexing and speedier searches.

The default value is Integer.MAX_VALUE.

Applies for Lucene Batch transaction support.

See Also:
Constant Field Values

MERGE_FACTOR

public static final String MERGE_FACTOR
Determines how often segment indices are merged by addDocument(). With smaller values, less RAM is used while indexing, and searches on unoptimized indices are faster, but indexing speed is slower. With larger values, more RAM is used during indexing, and while searches on unoptimized indices are slower, indexing is faster. Thus larger values (> 10) are best for batch index creation, and smaller values ( < 10) for indices that are interactively maintained.

This must never be less than 2. The default value is 10.

Applies for Lucene Batch transaction support.

See Also:
Constant Field Values

MAX_BUFFERED_DOCS

public static final String MAX_BUFFERED_DOCS
Determines the minimal number of documents required before the buffered in-memory documents are merging and a new Segment is created. Since Documents are merged in a RAMDirectory, large value gives faster indexing. At the same time, mergeFactor limits the number of files open in a FSDirectory.

The default value is 10.

Applies for Lucene Batch transaction support.

See Also:
Constant Field Values

USE_COMPOUND_FILE

public static final String USE_COMPOUND_FILE
Setting to turn on usage of a compound file. When on, multiple files for each segment are merged into a single file once the segment creation is finished. This is done regardless of what directory is in use.

Default value id true

See Also:
Constant Field Values

MAX_FIELD_LENGTH

public static final String MAX_FIELD_LENGTH
The maximum number of terms that will be indexed for a single field in a document. This limits the amount of memory required for indexing, so that collections with very large files will not crash the indexing process by running out of memory.

Note that this effectively truncates large documents, excluding from the index terms that occur further in the document. If you know your source documents are large, be sure to set this value high enough to accomodate the expected size. If you set it to Integer.MAX_VALUE, then the only limit is your memory, but you should anticipate an OutOfMemoryError.

By default, no more than 10,000 terms will be indexed for a field.

See Also:
Constant Field Values

CACHE_INTERVAL_INVALIDATION

public static final String CACHE_INTERVAL_INVALIDATION
Sets how often (in milliseconds) the index manager will check if the index cache needs to be invalidated. Defaults to 5000. Setting it to 0 means that the cache will check if it needs to be invalidated all the time. Setting it to -1 means that the cache will never check if it needs to be invalidated, note, that it is perfectly fine if a single instance is manipulating the index. It works, since the cache is invalidated when a transaction is committed and a dirty operation has occured.

See Also:
Constant Field Values

INDEX_MANAGER_SCHEDULE_INTERVAL

public static final String INDEX_MANAGER_SCHEDULE_INTERVAL
The index manager schedule interval (in seconds) where different actions related to index manager will happen (such as global cache interval checks. If set to -1, not scheduling will happen.

See Also:
Constant Field Values

WAIT_FOR_CACHE_INVALIDATION_ON_INDEX_OPERATION

public static final String WAIT_FOR_CACHE_INVALIDATION_ON_INDEX_OPERATION
Defaults to false. If set to true, will cause index manager operation (including replace index) to wait for all other Compass instances to invalidate their cache. The wait time will be the same as the INDEX_MANAGER_SCHEDULE_INTERVAL.

See Also:
Constant Field Values
Constructor Detail

LuceneEnvironment.SearchEngineIndex

public LuceneEnvironment.SearchEngineIndex()


Copyright (c) 2004-2006 The Compass Project.