Expert: constructs an IndexWriter with a custom {@link IndexDeletionPolicy}, for the index in
CopyC#
d
, first creating it if it does not already exist. Text will be analyzed with
CopyC#
a
.
has this index open (
CopyC#
write.lock
could not be obtained)
read/written to or if there is any other low-level IO error

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

Syntax

C#
[ObsoleteAttribute("This constructor will be removed in the 3.0 release. Use IndexWriter(Directory,Analyzer,IndexDeletionPolicy,MaxFieldLength) instead, and call Commit() when needed.")]
public IndexWriter(
	Directory d,
	bool autoCommit,
	Analyzer a,
	IndexDeletionPolicy deletionPolicy
)
Visual Basic
<ObsoleteAttribute("This constructor will be removed in the 3.0 release. Use IndexWriter(Directory,Analyzer,IndexDeletionPolicy,MaxFieldLength) instead, and call Commit() when needed.")> _
Public Sub New ( _
	d As Directory, _
	autoCommit As Boolean, _
	a As Analyzer, _
	deletionPolicy As IndexDeletionPolicy _
)
Visual C++
[ObsoleteAttribute(L"This constructor will be removed in the 3.0 release. Use IndexWriter(Directory,Analyzer,IndexDeletionPolicy,MaxFieldLength) instead, and call Commit() when needed.")]
public:
IndexWriter(
	Directory^ d, 
	bool autoCommit, 
	Analyzer^ a, 
	IndexDeletionPolicy^ deletionPolicy
)

Parameters

d
Type: Lucene.Net.Store..::..Directory
the index directory
autoCommit
Type: System..::..Boolean
see above
a
Type: Lucene.Net.Analysis..::..Analyzer
the analyzer to use
deletionPolicy
Type: Lucene.Net.Index..::..IndexDeletionPolicy
see above

See Also