Show / Hide Table of Contents

    Class SortedTermFreqIteratorWrapper

    This wrapper buffers incoming elements and makes sure they are sorted based on given comparer.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    SortedTermFreqIteratorWrapper
    Implements
    ITermFreqIterator
    IBytesRefIterator
    Namespace: Lucene.Net.Search.Suggest
    Assembly: Lucene.Net.Suggest.dll
    Syntax
    public class SortedTermFreqIteratorWrapper : object, ITermFreqIterator, IBytesRefIterator

    Constructors

    | Improve this Doc View Source

    SortedTermFreqIteratorWrapper(ITermFreqIterator)

    Creates a new sorted wrapper, using for sorting.

    Declaration
    public SortedTermFreqIteratorWrapper(ITermFreqIterator source)
    Parameters
    Type Name Description
    ITermFreqIterator source
    | Improve this Doc View Source

    SortedTermFreqIteratorWrapper(ITermFreqIterator, IComparer<BytesRef>)

    Creates a new sorted wrapper, sorting by BytesRef (ascending) then cost (ascending).

    Declaration
    public SortedTermFreqIteratorWrapper(ITermFreqIterator source, IComparer<BytesRef> comparer)
    Parameters
    Type Name Description
    ITermFreqIterator source
    IComparer<BytesRef> comparer

    Properties

    | Improve this Doc View Source

    Comparer

    Declaration
    public virtual IComparer<BytesRef> Comparer { get; }
    Property Value
    Type Description
    IComparer<BytesRef>
    | Improve this Doc View Source

    Weight

    Declaration
    public virtual long Weight { get; }
    Property Value
    Type Description
    System.Int64

    Methods

    | Improve this Doc View Source

    Decode(BytesRef, ByteArrayDataInput)

    decodes the weight at the current position

    Declaration
    protected virtual long Decode(BytesRef scratch, ByteArrayDataInput tmpInput)
    Parameters
    Type Name Description
    BytesRef scratch
    ByteArrayDataInput tmpInput
    Returns
    Type Description
    System.Int64
    | Improve this Doc View Source

    Encode(OfflineSorter.ByteSequencesWriter, ByteArrayDataOutput, Byte[], BytesRef, Int64)

    encodes an entry (bytes+weight) to the provided writer

    Declaration
    protected virtual void Encode(OfflineSorter.ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, long weight)
    Parameters
    Type Name Description
    OfflineSorter.ByteSequencesWriter writer
    ByteArrayDataOutput output
    System.Byte[] buffer
    BytesRef spare
    System.Int64 weight
    | Improve this Doc View Source

    Next()

    Declaration
    public virtual BytesRef Next()
    Returns
    Type Description
    BytesRef

    Implements

    ITermFreqIterator
    IBytesRefIterator
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)