Class ExternalRefSorter
Builds and iterates over sequences stored on disk.
Inherited Members
Namespace: Lucene.Net.Search.Suggest.Fst
Assembly: Lucene.Net.Suggest.dll
Syntax
public class ExternalRefSorter : IBytesRefSorter, IDisposable
Constructors
ExternalRefSorter(OfflineSorter)
Will buffer all sequences to a temporary file and then sort (all on-disk).
Declaration
public ExternalRefSorter(OfflineSorter sort)
Parameters
Type | Name | Description |
---|---|---|
OfflineSorter | sort |
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 virtual 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. |
Dispose()
Removes any written temporary files.
Declaration
public void Dispose()
Dispose(bool)
Builds and iterates over sequences stored on disk.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
GetEnumerator()
Sorts the entries added in Add(BytesRef) and returns an enumerator over all sorted entries.
Declaration
public virtual IBytesRefEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
IBytesRefEnumerator |
Exceptions
Type | Condition |
---|---|
IOException | If an I/O exception occurs. |