Apache Lucene.Net 2.4.0 Class Library API

IndexFileDeleter Members

IndexFileDeleter overview

Public Static Fields

VERBOSE_REF_COUNTSChange to true to see details of reference counts when infoStream != null

Public Instance Constructors

IndexFileDeleter Constructor Initialize the deleter: find all previous commits in the Directory, incref the files they reference, call the policy to let it delete commits. The incoming segmentInfos must have been loaded from a commit point and not yet modified. This will remove any files not referenced by any of the commits.

Public Instance Methods

Checkpoint For definition of "check point" see IndexWriter comments: "Clarification: Check Points (and commits)". Writer calls this when it has made a "consistent change" to the index, meaning new files are written to the index and the in-memory SegmentInfos have been modified to point to those files. This may or may not be a commit (segments_N may or may not have been written). We simply incref the files referenced by the new SegmentInfos and decref the files we had previously seen (if any). If this is a commit, we also call the policy to give it a chance to remove other commits. If any commits are removed, we decref their files as well.
Close 
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object)Gets the Type of the current instance.
RefreshOverloaded. Writer calls this when it has hit an error and had to roll back, to tell us that there may now be unreferenced files in the filesystem. So we re-list the filesystem and delete such files. If segmentName is non-null, we will only delete files corresponding to that segment.
ToString (inherited from Object)Returns a String that represents the current Object.

See Also

IndexFileDeleter Class | Lucene.Net.Index Namespace