Class FieldInfo
Access to the Field Info file that describes document fields and whether or not they are indexed. Each segment has a separate Field Info file. Objects of this class are thread-safe for multiple readers, but only one thread can be adding documents at a time, with no other reader or writer threads accessing this object.
Inheritance
Namespace: Lucene.Net.Index
Assembly: Lucene.Net.dll
Syntax
public sealed class FieldInfo : object
Constructors
| Improve this Doc View SourceFieldInfo(String, Boolean, Int32, Boolean, Boolean, Boolean, IndexOptions, DocValuesType, DocValuesType, IDictionary<String, String>)
Sole Constructor.
Declaration
public FieldInfo(string name, bool indexed, int number, bool storeTermVector, bool omitNorms, bool storePayloads, IndexOptions indexOptions, DocValuesType docValues, DocValuesType normsType, IDictionary<string, string> attributes)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
System.Boolean | indexed | |
System.Int32 | number | |
System.Boolean | storeTermVector | |
System.Boolean | omitNorms | |
System.Boolean | storePayloads | |
IndexOptions | indexOptions | |
DocValuesType | docValues | |
DocValuesType | normsType | |
IDictionary<System.String, System.String> | attributes |
Properties
| Improve this Doc View SourceAttributes
Returns internal codec attributes map. May be null
if no mappings exist.
Declaration
public IDictionary<string, string> Attributes { get; }
Property Value
Type | Description |
---|---|
IDictionary<System.String, System.String> |
DocValuesGen
Gets or Sets the docValues generation of this field, or -1 if no docValues.
Declaration
public long DocValuesGen { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
DocValuesType
Declaration
public DocValuesType DocValuesType { get; }
Property Value
Type | Description |
---|---|
DocValuesType |
HasDocValues
Returns true
if this field has any docValues.
Declaration
public bool HasDocValues { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasNorms
Returns true
if this field actually has any norms.
Declaration
public bool HasNorms { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasPayloads
Returns true
if any payloads exist for this field.
Declaration
public bool HasPayloads { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasVectors
Returns true
if any term vectors exist for this field.
Declaration
public bool HasVectors { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IndexOptions
Returns IndexOptions for the field, or null
if the field is not indexed
Declaration
public IndexOptions IndexOptions { get; }
Property Value
Type | Description |
---|---|
IndexOptions |
IsIndexed
Returns true
if this field is indexed.
Declaration
public bool IsIndexed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
Field's name
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
NormType
Returns DocValuesType of the norm. This may be NONE if the field has no norms.
Declaration
public DocValuesType NormType { get; }
Property Value
Type | Description |
---|---|
DocValuesType |
Number
Internal field number
Declaration
public int Number { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
OmitsNorms
Returns true
if norms are explicitly omitted for this field
Declaration
public bool OmitsNorms { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceGetAttribute(String)
Get a codec attribute value, or null
if it does not exist
Declaration
public string GetAttribute(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type | Description |
---|---|
System.String |
PutAttribute(String, String)
Puts a codec attribute value.
this is a key-value mapping for the field that the codec can use to store additional metadata, and will be available to the codec when reading the segment via GetAttribute(String)
If a value already exists for the field, it will be replaced with the new value.
Declaration
public string PutAttribute(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
System.String | value |
Returns
Type | Description |
---|---|
System.String |