DotLucene 1.4 API Documentation |

# IndexWriter Members

IndexWriter overview

#### Public Static Fields

COMMIT_LOCK_NAME |
COMMIT_LOCK_TIMEOUT | Default value is 10000. Use `Lucene.Net.commitLockTimeout` system property to override.
DEFAULT_MAX_FIELD_LENGTH | Default value is 10000. Use `Lucene.Net.maxFieldLength` system property to override.
DEFAULT_MAX_MERGE_DOCS | Default value is {@link Integer.MAX_VALUE}. Use `Lucene.Net.maxMergeDocs` system property to override.
DEFAULT_MERGE_FACTOR | Default value is 10. Use `Lucene.Net.mergeFactor` system property to override.
DEFAULT_MIN_MERGE_DOCS | Default value is 10. Use `Lucene.Net.minMergeDocs` system property to override.
WRITE_LOCK_NAME |
WRITE_LOCK_TIMEOUT | Default value is 1000. Use `Lucene.Net.writeLockTimeout` system property to override.

#### Public Instance Constructors

IndexWriter | Overloaded. Initializes a new instance of the IndexWriter class.

#### Public Instance Fields

infoStream | If non-null, information about merges will be printed to this.
maxFieldLength | 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.
maxMergeDocs |
mergeFactor |
minMergeDocs |

#### Public Instance Methods

AddDocument | Overloaded. Adds a document to this index, using the provided analyzer instead of the value of {@link .GetAnalyzer()}. If the document contains more than {@link .maxFieldLength} terms for a given Field, the remainder are discarded.
AddIndexes | Overloaded. Merges the provided indexes into this index. After this completes, the index is optimized. The provided IndexReaders are not closed.
Close | Flushes all changes to an index and closes all associated files.
DocCount | Returns the number of documents currently in this index.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetAnalyzer | Returns the analyzer used by this index.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetSimilarity |
GetType (inherited from Object) | Gets the Type of the current instance.
GetUseCompoundFile | 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.
Optimize | Merges all segments together into a single segment, optimizing an index for search.
SetSimilarity | Expert: Set the Similarity implementation used by this IndexWriter.
SetUseCompoundFile | 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.
ToString (inherited from Object) | Returns a String that represents the current Object.

#### Protected Instance Methods

Finalize | Release the write lock, if needed.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

#### See Also

IndexWriter Class | Lucene.Net.Index Namespace