Show / Hide Table of Contents

    Class OfflineSorter

    On-disk sorting of byte arrays. Each byte array (entry) is a composed of the following fields:

    • (two bytes) length of the following byte array,
    • exactly the above count of bytes for the sequence to be sorted.

    Inheritance
    System.Object
    OfflineSorter
    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.Util
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class OfflineSorter

    Constructors

    | Improve this Doc View Source

    OfflineSorter()

    Defaults constructor.

    Declaration
    public OfflineSorter()
    See Also
    DefaultTempDir()
    Automatic()
    | Improve this Doc View Source

    OfflineSorter(IComparer<BytesRef>)

    Defaults constructor with a custom comparer.

    Declaration
    public OfflineSorter(IComparer<BytesRef> comparer)
    Parameters
    Type Name Description
    System.Collections.Generic.IComparer<BytesRef> comparer
    See Also
    DefaultTempDir()
    Automatic()
    | Improve this Doc View Source

    OfflineSorter(IComparer<BytesRef>, OfflineSorter.BufferSize, DirectoryInfo, Int32)

    All-details constructor.

    Declaration
    public OfflineSorter(IComparer<BytesRef> comparer, OfflineSorter.BufferSize ramBufferSize, DirectoryInfo tempDirectory, int maxTempfiles)
    Parameters
    Type Name Description
    System.Collections.Generic.IComparer<BytesRef> comparer
    OfflineSorter.BufferSize ramBufferSize
    System.IO.DirectoryInfo tempDirectory
    System.Int32 maxTempfiles

    Fields

    | Improve this Doc View Source

    ABSOLUTE_MIN_SORT_BUFFER_SIZE

    Absolute minimum required buffer size for sorting.

    Declaration
    public static readonly long ABSOLUTE_MIN_SORT_BUFFER_SIZE
    Field Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    DEFAULT_COMPARER

    Default comparer: sorts in binary (codepoint) order

    Declaration
    public static readonly IComparer<BytesRef> DEFAULT_COMPARER
    Field Value
    Type Description
    System.Collections.Generic.IComparer<BytesRef>
    | Improve this Doc View Source

    GB

    Convenience constant for gigabytes

    Declaration
    public static readonly long GB
    Field Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    MAX_TEMPFILES

    Maximum number of temporary files before doing an intermediate merge.

    Declaration
    public static readonly int MAX_TEMPFILES
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    MB

    Convenience constant for megabytes

    Declaration
    public static readonly long MB
    Field Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    MIN_BUFFER_SIZE_MB

    Minimum recommended buffer size for sorting.

    Declaration
    public static readonly long MIN_BUFFER_SIZE_MB
    Field Value
    Type Description
    System.Int64

    Properties

    | Improve this Doc View Source

    Comparer

    Returns the comparer in use to sort entries

    Declaration
    public IComparer<BytesRef> Comparer { get; }
    Property Value
    Type Description
    System.Collections.Generic.IComparer<BytesRef>

    Methods

    | Improve this Doc View Source

    DefaultTempDir()

    Returns the default temporary directory. By default, the System's temp folder. If not accessible or not available, an System.IO.IOException is thrown.

    Declaration
    public static DirectoryInfo DefaultTempDir()
    Returns
    Type Description
    System.IO.DirectoryInfo
    | Improve this Doc View Source

    Sort(FileInfo, FileInfo)

    Sort input to output, explicit hint for the buffer size. The amount of allocated memory may deviate from the hint (may be smaller or larger).

    Declaration
    public OfflineSorter.SortInfo Sort(FileInfo input, FileInfo output)
    Parameters
    Type Name Description
    System.IO.FileInfo input
    System.IO.FileInfo output
    Returns
    Type Description
    OfflineSorter.SortInfo

    Extension Methods

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