Show / Hide Table of Contents

    Class Terms

    Access to the terms in a specific field. See Fields.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    Terms
    BlockTreeTermsReader.FieldReader
    FilterAtomicReader.FilterTerms
    MultiTerms
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Index
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class Terms

    Constructors

    | Improve this Doc View Source

    Terms()

    Sole constructor. (For invocation by subclass constructors, typically implicit.)

    Declaration
    protected Terms()

    Fields

    | Improve this Doc View Source

    EMPTY_ARRAY

    Zero-length array of Terms.

    Declaration
    public static readonly Terms[] EMPTY_ARRAY
    Field Value
    Type Description
    Terms[]

    Properties

    | Improve this Doc View Source

    Comparer

    Return the IComparer{BytesRef} used to sort terms provided by the iterator. This method may return null if there are no terms. This method may be invoked many times; it's best to cache a single instance & reuse it.

    Declaration
    public abstract IComparer<BytesRef> Comparer { get; }
    Property Value
    Type Description
    System.Collections.Generic.IComparer<BytesRef>
    | Improve this Doc View Source

    Count

    Returns the number of terms for this field, or -1 if this measure isn't stored by the codec. Note that, just like other term measures, this measure does not take deleted documents into account. NOTE: This was size() in Lucene.

    Declaration
    public abstract long Count { get; }
    Property Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    DocCount

    Returns the number of documents that have at least one term for this field, or -1 if this measure isn't stored by the codec. Note that, just like other term measures, this measure does not take deleted documents into account.

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

    HasFreqs

    Returns true if documents in this field store per-document term frequency (Freq).

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

    HasOffsets

    Returns true if documents in this field store offsets.

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

    HasPayloads

    Returns true if documents in this field store payloads.

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

    HasPositions

    Returns true if documents in this field store positions.

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

    SumDocFreq

    Returns the sum of DocFreq for all terms in this field, or -1 if this measure isn't stored by the codec. Note that, just like other term measures, this measure does not take deleted documents into account.

    Declaration
    public abstract long SumDocFreq { get; }
    Property Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    SumTotalTermFreq

    Returns the sum of TotalTermFreq for all terms in this field, or -1 if this measure isn't stored by the codec (or if this fields omits term freq and positions). Note that, just like other term measures, this measure does not take deleted documents into account.

    Declaration
    public abstract long SumTotalTermFreq { get; }
    Property Value
    Type Description
    System.Int64

    Methods

    | Improve this Doc View Source

    GetIterator(TermsEnum)

    Returns an iterator that will step through all terms. This method will not return null. If you have a previous TermsEnum, for example from a different field, you can pass it for possible reuse if the implementation can do so.

    Declaration
    public abstract TermsEnum GetIterator(TermsEnum reuse)
    Parameters
    Type Name Description
    TermsEnum reuse
    Returns
    Type Description
    TermsEnum
    | Improve this Doc View Source

    Intersect(CompiledAutomaton, BytesRef)

    Returns a TermsEnum that iterates over all terms that are accepted by the provided CompiledAutomaton. If the startTerm is provided then the returned enum will only accept terms

    startTerm, but you still must call Next() first to get to the first term. Note that the provided startTerm must be accepted by the automaton.

    NOTE: the returned TermsEnum cannot seek

    .

    Declaration
    public virtual TermsEnum Intersect(CompiledAutomaton compiled, BytesRef startTerm)
    Parameters
    Type Name Description
    CompiledAutomaton compiled
    BytesRef startTerm
    Returns
    Type Description
    TermsEnum

    Extension Methods

    Number.IsNumber(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Licensed to the Apache Software Foundation (ASF)