Lucene.Net 1.9.1 Class Library

IndexModifier Members

IndexModifier overview

Public Instance Constructors

IndexModifier Overloaded. Initializes a new instance of the IndexModifier class.

Public Instance Methods

AddDocumentOverloaded. Adds a document to this index. If the document contains more than {@link #SetMaxFieldLength(int)} terms for a given field, the remainder are discarded.
Close Close this index, writing all pending changes to disk.
DeleteOverloaded. Deletes the document numbered
docNum
.
DeleteDocument Deletes the document numbered
docNum
.
DeleteDocuments Deletes all documents containing
term
. This is useful if one uses a document field to hold a unique ID string for the document. Then to delete such a document, one merely constructs a term with the appropriate field and the unique ID string as its text and passes it to this method. Returns the number of documents deleted.
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.
Flush Make sure all changes are written to disk.
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.
GetInfoStream 
GetMaxBufferedDocs 
GetMaxFieldLength 
GetMergeFactor 
GetType (inherited from Object) Gets the Type of the current instance.
GetUseCompoundFile 
Optimize Merges all segments together into a single segment, optimizing an index for search.
SetInfoStream 
SetMaxBufferedDocs 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.
SetMaxFieldLength 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.
SetMergeFactor 
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 

Protected Instance Methods

Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

Protected Internal Instance Fields

analyzer 
directory 
indexReader 
indexWriter 
infoStream 
maxBufferedDocs 
maxFieldLength 
mergeFactor 
open 
useCompoundFile 

Protected Internal Instance Methods

AssureOpen Throw an IllegalStateException if the index is closed.
CreateIndexReader Close the IndexWriter and open an IndexReader.
CreateIndexWriter Close the IndexReader and open an IndexWriter.
Init Initialize an IndexWriter.

See Also

IndexModifier Class | Lucene.Net.Index Namespace