Initialize the deleter: find all previous commits in the Directory, incref the files they reference, call the policy to let it delete commits. This will remove any files not referenced by any of the commits.

Namespace: Lucene.Net.Index
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public IndexFileDeleter(
	Directory directory,
	IndexDeletionPolicy policy,
	SegmentInfos segmentInfos,
	StreamWriter infoStream,
	DocumentsWriter docWriter,
	Dictionary<string, string> synced
)
Visual Basic
Public Sub New ( _
	directory As Directory, _
	policy As IndexDeletionPolicy, _
	segmentInfos As SegmentInfos, _
	infoStream As StreamWriter, _
	docWriter As DocumentsWriter, _
	synced As Dictionary(Of String, String) _
)
Visual C++
public:
IndexFileDeleter(
	Directory^ directory, 
	IndexDeletionPolicy^ policy, 
	SegmentInfos^ segmentInfos, 
	StreamWriter^ infoStream, 
	DocumentsWriter^ docWriter, 
	Dictionary<String^, String^>^ synced
)

Parameters

directory
Type: Lucene.Net.Store..::..Directory

[Missing <param name="directory"/> documentation for "M:Lucene.Net.Index.IndexFileDeleter.#ctor(Lucene.Net.Store.Directory,Lucene.Net.Index.IndexDeletionPolicy,Lucene.Net.Index.SegmentInfos,System.IO.StreamWriter,Lucene.Net.Index.DocumentsWriter,System.Collections.Generic.Dictionary{System.String,System.String})"]

policy
Type: Lucene.Net.Index..::..IndexDeletionPolicy

[Missing <param name="policy"/> documentation for "M:Lucene.Net.Index.IndexFileDeleter.#ctor(Lucene.Net.Store.Directory,Lucene.Net.Index.IndexDeletionPolicy,Lucene.Net.Index.SegmentInfos,System.IO.StreamWriter,Lucene.Net.Index.DocumentsWriter,System.Collections.Generic.Dictionary{System.String,System.String})"]

segmentInfos
Type: Lucene.Net.Index..::..SegmentInfos

[Missing <param name="segmentInfos"/> documentation for "M:Lucene.Net.Index.IndexFileDeleter.#ctor(Lucene.Net.Store.Directory,Lucene.Net.Index.IndexDeletionPolicy,Lucene.Net.Index.SegmentInfos,System.IO.StreamWriter,Lucene.Net.Index.DocumentsWriter,System.Collections.Generic.Dictionary{System.String,System.String})"]

infoStream
Type: System.IO..::..StreamWriter

[Missing <param name="infoStream"/> documentation for "M:Lucene.Net.Index.IndexFileDeleter.#ctor(Lucene.Net.Store.Directory,Lucene.Net.Index.IndexDeletionPolicy,Lucene.Net.Index.SegmentInfos,System.IO.StreamWriter,Lucene.Net.Index.DocumentsWriter,System.Collections.Generic.Dictionary{System.String,System.String})"]

docWriter
Type: Lucene.Net.Index..::..DocumentsWriter

[Missing <param name="docWriter"/> documentation for "M:Lucene.Net.Index.IndexFileDeleter.#ctor(Lucene.Net.Store.Directory,Lucene.Net.Index.IndexDeletionPolicy,Lucene.Net.Index.SegmentInfos,System.IO.StreamWriter,Lucene.Net.Index.DocumentsWriter,System.Collections.Generic.Dictionary{System.String,System.String})"]

synced
Type: System.Collections.Generic..::..Dictionary<(Of <(<'String, String>)>)>

[Missing <param name="synced"/> documentation for "M:Lucene.Net.Index.IndexFileDeleter.#ctor(Lucene.Net.Store.Directory,Lucene.Net.Index.IndexDeletionPolicy,Lucene.Net.Index.SegmentInfos,System.IO.StreamWriter,Lucene.Net.Index.DocumentsWriter,System.Collections.Generic.Dictionary{System.String,System.String})"]

See Also