Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class InMemorySorter

    An IBytesRefSorter that keeps all the entries in memory.

    Note

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

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Inheritance
    object
    InMemorySorter
    Implements
    IBytesRefSorter
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Search.Suggest
    Assembly: Lucene.Net.Suggest.dll
    Syntax
    public sealed class InMemorySorter : IBytesRefSorter

    Constructors

    InMemorySorter(IComparer<BytesRef>)

    Creates an InMemorySorter, sorting entries by the provided comparer.

    Declaration
    public InMemorySorter(IComparer<BytesRef> comparer)
    Parameters
    Type Name Description
    IComparer<BytesRef> comparer

    Properties

    Comparer

    Comparer used to determine the sort order of entries.

    Declaration
    public IComparer<BytesRef> Comparer { get; }
    Property Value
    Type Description
    IComparer<BytesRef>

    Methods

    Add(BytesRef)

    Adds a single suggestion entry (possibly compound with its bucket).

    Declaration
    public void Add(BytesRef utf8)
    Parameters
    Type Name Description
    BytesRef utf8
    Exceptions
    Type Condition
    IOException

    If an I/O exception occurs.

    InvalidOperationException

    If an addition attempt is performed after a call to GetEnumerator() has been made.

    GetEnumerator()

    Sorts the entries added in Add(BytesRef) and returns an enumerator over all sorted entries.

    Declaration
    public IBytesRefEnumerator GetEnumerator()
    Returns
    Type Description
    IBytesRefEnumerator
    Exceptions
    Type Condition
    IOException

    If an I/O exception occurs.

    Implements

    IBytesRefSorter
    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.