Show / Hide Table of Contents

    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
    System.Object
    FieldInfo
    Namespace: Lucene.Net.Index
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class FieldInfo : object

    Constructors

    | Improve this Doc View Source

    FieldInfo(String, Boolean, Int32, Boolean, Boolean, Boolean, IndexOptions, DocValuesType, DocValuesType, IDictionary<String, String>)

    Sole Constructor.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    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 Source

    Attributes

    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>
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    DocValuesType

    Declaration
    public DocValuesType DocValuesType { get; }
    Property Value
    Type Description
    DocValuesType
    | Improve this Doc View Source

    HasDocValues

    Returns true if this field has any docValues.

    Declaration
    public bool HasDocValues { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    HasNorms

    Returns true if this field actually has any norms.

    Declaration
    public bool HasNorms { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    HasPayloads

    Returns true if any payloads exist for this field.

    Declaration
    public bool HasPayloads { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    HasVectors

    Returns true if any term vectors exist for this field.

    Declaration
    public bool HasVectors { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IndexOptions

    Returns IndexOptions for the field, or null if the field is not indexed

    Declaration
    public IndexOptions IndexOptions { get; }
    Property Value
    Type Description
    IndexOptions
    | Improve this Doc View Source

    IsIndexed

    Returns true if this field is indexed.

    Declaration
    public bool IsIndexed { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Name

    Field's name

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    Number

    Internal field number

    Declaration
    public int Number { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    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 Source

    GetAttribute(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
    | Improve this Doc View Source

    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
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)