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
Inherited Members
Namespace: Lucene.Net.Index
Assembly: Lucene.Net.dll
Syntax
public sealed class FieldInfo
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. |
name | |
System. |
indexed | |
System. |
number | |
System. |
storeTermVector | |
System. |
omitNorms | |
System. |
storePayloads | |
Index |
indexOptions | |
Doc |
docValues | |
Doc |
normsType | |
System. |
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 |
---|---|
System. |
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. |
DocValuesType
Declaration
public DocValuesType DocValuesType { get; }
Property Value
Type | Description |
---|---|
Doc |
HasDocValues
Returns true
if this field has any docValues.
Declaration
public bool HasDocValues { get; }
Property Value
Type | Description |
---|---|
System. |
HasNorms
Returns true
if this field actually has any norms.
Declaration
public bool HasNorms { get; }
Property Value
Type | Description |
---|---|
System. |
HasPayloads
Returns true
if any payloads exist for this field.
Declaration
public bool HasPayloads { get; }
Property Value
Type | Description |
---|---|
System. |
HasVectors
Returns true
if any term vectors exist for this field.
Declaration
public bool HasVectors { get; }
Property Value
Type | Description |
---|---|
System. |
IndexOptions
Returns Indexnull
if the field is not indexed
Declaration
public IndexOptions IndexOptions { get; }
Property Value
Type | Description |
---|---|
Index |
IsIndexed
Returns true
if this field is indexed.
Declaration
public bool IsIndexed { get; }
Property Value
Type | Description |
---|---|
System. |
Name
Field's name
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System. |
NormType
Returns Doc
Declaration
public DocValuesType NormType { get; }
Property Value
Type | Description |
---|---|
Doc |
Number
Internal field number
Declaration
public int Number { get; }
Property Value
Type | Description |
---|---|
System. |
OmitsNorms
Returns true
if norms are explicitly omitted for this field
Declaration
public bool OmitsNorms { get; }
Property Value
Type | Description |
---|---|
System. |
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. |
key |
Returns
Type | Description |
---|---|
System. |
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 Get
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. |
key | |
System. |
value |
Returns
Type | Description |
---|---|
System. |