Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class UnsortedInputEnumerator

    This wrapper buffers the incoming elements and makes sure they are in random order.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    object
    BufferedInputEnumerator
    UnsortedInputEnumerator
    Implements
    IInputEnumerator
    IBytesRefEnumerator
    Inherited Members
    BufferedInputEnumerator.m_entries
    BufferedInputEnumerator.m_payloads
    BufferedInputEnumerator.m_contextSets
    BufferedInputEnumerator.m_curPos
    BufferedInputEnumerator.m_freqs
    BufferedInputEnumerator.m_current
    BufferedInputEnumerator.Current
    BufferedInputEnumerator.HasPayloads
    BufferedInputEnumerator.Comparer
    BufferedInputEnumerator.HasContexts
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Search.Suggest
    Assembly: Lucene.Net.Suggest.dll
    Syntax
    public class UnsortedInputEnumerator : BufferedInputEnumerator, IInputEnumerator, IBytesRefEnumerator

    Constructors

    UnsortedInputEnumerator(IInputEnumerator)

    Creates a new iterator, wrapping the specified iterator and returning elements in a random order.

    Declaration
    public UnsortedInputEnumerator(IInputEnumerator source)
    Parameters
    Type Name Description
    IInputEnumerator source

    Properties

    Contexts

    A term's contexts context can be used to filter suggestions. May return null, if suggest entries do not have any context

    Declaration
    public override ICollection<BytesRef> Contexts { get; }
    Property Value
    Type Description
    ICollection<BytesRef>
    Overrides
    BufferedInputEnumerator.Contexts

    Payload

    An arbitrary byte[] to record per suggestion. See Payload to retrieve the payload for each suggestion.

    Declaration
    public override BytesRef Payload { get; }
    Property Value
    Type Description
    BytesRef
    Overrides
    BufferedInputEnumerator.Payload

    Weight

    A term's weight, higher numbers mean better suggestions.

    Declaration
    public override long Weight { get; }
    Property Value
    Type Description
    long
    Overrides
    BufferedInputEnumerator.Weight

    Methods

    MoveNext()

    Increments the iteration to the next Lucene.Net.Util.BytesRef in the enumerator.

    Declaration
    public override bool MoveNext()
    Returns
    Type Description
    bool

    true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.

    Overrides
    BufferedInputEnumerator.MoveNext()
    Exceptions
    Type Condition
    IOException

    If there is a low-level I/O error.

    Implements

    IInputEnumerator
    Lucene.Net.Util.IBytesRefEnumerator
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.