Class FieldType
Describes the properties of a field.
Inheritance
Implements
Namespace: Lucene.Net.Documents
Assembly: Lucene.Net.dll
Syntax
public class FieldType : object, IIndexableFieldType
Constructors
| Improve this Doc View SourceFieldType()
Create a new FieldType with default properties.
Declaration
public FieldType()
FieldType(FieldType)
Create a new mutable FieldType with all of the properties from ref
Declaration
public FieldType(FieldType ref)
Parameters
Type | Name | Description |
---|---|---|
FieldType | ref |
Properties
| Improve this Doc View SourceDocValueType
Sets the field's DocValuesType, or set to NONE if no DocValues should be stored.
Declaration
public virtual DocValuesType DocValueType { get; set; }
Property Value
Type | Description |
---|---|
DocValuesType |
IndexOptions
Sets the indexing options for the field.
The default is DOCS_AND_FREQS_AND_POSITIONS.
Declaration
public virtual IndexOptions IndexOptions { get; set; }
Property Value
Type | Description |
---|---|
IndexOptions |
IsIndexed
Set to true
to index (invert) this field. The default is false
.
Declaration
public virtual bool IsIndexed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsStored
Set to true
to store this field. The default is false
.
Declaration
public virtual bool IsStored { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsTokenized
Set to true
to tokenize this field's contents via the
configured Analyzer. The default is false
.
Declaration
public virtual bool IsTokenized { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
NumericPrecisionStep
Sets the numeric precision step for the field.
This has no effect if NumericType returns NONE.
The default is PRECISION_STEP_DEFAULT.
Declaration
public virtual int NumericPrecisionStep { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
NumericType
Specifies the field's numeric type, or set to null
if the field has no numeric type.
If non-null then the field's value will be indexed numerically so that
NumericRangeQuery can be used at search time.
Declaration
public virtual NumericType NumericType { get; set; }
Property Value
Type | Description |
---|---|
NumericType |
OmitNorms
Set to true
to omit normalization values for the field. The default is false
.
Declaration
public virtual bool OmitNorms { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
StoreTermVectorOffsets
Set to true
to also store token character offsets into the term
vector for this field. The default is false
.
Declaration
public virtual bool StoreTermVectorOffsets { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
StoreTermVectorPayloads
Set to true
to also store token payloads into the term
vector for this field. The default is false
.
Declaration
public virtual bool StoreTermVectorPayloads { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
StoreTermVectorPositions
Set to true
to also store token positions into the term
vector for this field. The default is false
.
Declaration
public virtual bool StoreTermVectorPositions { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
StoreTermVectors
Set to true
if this field's indexed form should be also stored
into term vectors. The default is false
.
Declaration
public virtual bool StoreTermVectors { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceFreeze()
Prevents future changes. Note, it is recommended that this is called once the FieldType's properties have been set, to prevent unintentional state changes.
Declaration
public virtual void Freeze()
ToString()
Prints a FieldType for human consumption.
Declaration
public override sealed string ToString()
Returns
Type | Description |
---|---|
System.String |