Class SortedTermFreqIteratorWrapper
This wrapper buffers incoming elements and makes sure they are sorted based on given comparer.
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
Inheritance
System.Object
SortedTermFreqIteratorWrapper
Namespace: Lucene.Net.Search.Suggest
Assembly: Lucene.Net.Suggest.dll
Syntax
public class SortedTermFreqIteratorWrapper : object, ITermFreqIterator, IBytesRefIterator
Constructors
| Improve this Doc View SourceSortedTermFreqIteratorWrapper(ITermFreqIterator)
Creates a new sorted wrapper, using
Declaration
public SortedTermFreqIteratorWrapper(ITermFreqIterator source)
Parameters
Type | Name | Description |
---|---|---|
ITerm |
source |
SortedTermFreqIteratorWrapper(ITermFreqIterator, IComparer<BytesRef>)
Creates a new sorted wrapper, sorting by BytesRef (ascending) then cost (ascending).
Declaration
public SortedTermFreqIteratorWrapper(ITermFreqIterator source, IComparer<BytesRef> comparer)
Parameters
Type | Name | Description |
---|---|---|
ITerm |
source | |
IComparer<Bytes |
comparer |
Properties
| Improve this Doc View SourceComparer
Declaration
public virtual IComparer<BytesRef> Comparer { get; }
Property Value
Type | Description |
---|---|
IComparer<Bytes |
Weight
Declaration
public virtual long Weight { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
| Improve this Doc View SourceDecode(BytesRef, ByteArrayDataInput)
decodes the weight at the current position
Declaration
protected virtual long Decode(BytesRef scratch, ByteArrayDataInput tmpInput)
Parameters
Type | Name | Description |
---|---|---|
Bytes |
scratch | |
Byte |
tmpInput |
Returns
Type | Description |
---|---|
System. |
Encode(OfflineSorter.ByteSequencesWriter, ByteArrayDataOutput, Byte[], BytesRef, Int64)
encodes an entry (bytes+weight) to the provided writer
Declaration
protected virtual void Encode(OfflineSorter.ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, long weight)
Parameters
Type | Name | Description |
---|---|---|
Offline |
writer | |
Byte |
output | |
System. |
buffer | |
Bytes |
spare | |
System. |
weight |
Next()
Declaration
public virtual BytesRef Next()
Returns
Type | Description |
---|---|
Bytes |
Implements
IBytesRefIterator