Apache Lucene.Net 2.4.0 Class Library API

FieldInfos.Add Method (String, Boolean, Boolean, Boolean, Boolean, Boolean)

If the field is not yet known, adds it. If it is known, checks to make sure that the isIndexed flag is the same as was given previously for this field. If not - marks it as being indexed. Same goes for the TermVector parameters.

public void Add(
   string name,
   bool isIndexed,
   bool storeTermVector,
   bool storePositionWithTermVector,
   bool storeOffsetWithTermVector,
   bool omitNorms
);

Parameters

name
The name of the field
isIndexed
true if the field is indexed
storeTermVector
true if the term vector should be stored
storePositionWithTermVector
true if the term vector with positions should be stored
storeOffsetWithTermVector
true if the term vector with offsets should be stored
omitNorms
true if the norms for the indexed field should be omitted

See Also

FieldInfos Class | Lucene.Net.Index Namespace | FieldInfos.Add Overload List