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
Inherited Members
Namespace: Lucene.Net.Util
Assembly: Lucene.Net.dll
Syntax
public sealed class OfflineSorter
Constructors
| Improve this Doc View SourceOfflineSorter()
Defaults constructor.
Declaration
public OfflineSorter()
See Also
| Improve this Doc View SourceOfflineSorter(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
| Improve this Doc View SourceOfflineSorter(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 SourceABSOLUTE_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 |
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> |
GB
Convenience constant for gigabytes
Declaration
public static readonly long GB
Field Value
Type | Description |
---|---|
System.Int64 |
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 |
MB
Convenience constant for megabytes
Declaration
public static readonly long MB
Field Value
Type | Description |
---|---|
System.Int64 |
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 SourceComparer
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 SourceDefaultTempDir()
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 |
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 |