Adds a field to a document. Several fields may be added with the same name. In this case, if the fields are indexed, their text is treated as though appended for the purposes of search.

Note that add like the removeField(s) methods only makes 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 Add(
	Fieldable field
)
Visual Basic
Public Sub Add ( _
	field As Fieldable _
)
Visual C++
public:
void Add(
	Fieldable^ field
)

Parameters

field
Type: Lucene.Net.Documents..::..Fieldable

[Missing <param name="field"/> documentation for "M:Lucene.Net.Documents.Document.Add(Lucene.Net.Documents.Fieldable)"]

See Also