Removes field with the specified name from the document. If multiple fields exist with this name, this method removes the first field that has been added. If there is no field with the specified name, the document remains unchanged.

Note that the removeField(s) methods like the add method only make sense prior to adding a document to an index. These methods cannot be used to change the content of an existing index! In order to achieve this, a document has to be deleted from an index and a new changed version of that document has to be added.

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

Syntax

C#
public void RemoveField(
	string name
)
Visual Basic
Public Sub RemoveField ( _
	name As String _
)
Visual C++
public:
void RemoveField(
	String^ name
)

Parameters

name
Type: System..::..String

[Missing <param name="name"/> documentation for "M:Lucene.Net.Documents.Document.RemoveField(System.String)"]

See Also