Class SortedInputIterator
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
SortedInputIterator
Implements
IBytesRefIterator
Assembly: Lucene.Net.Suggest.dll
public class SortedInputIterator : object, IInputIterator, IBytesRefIterator
Constructors
|
Improve this Doc
View Source
Creates a new sorted wrapper, using
for sorting.
Declaration
public SortedInputIterator(IInputIterator source)
Parameters
|
Improve this Doc
View Source
Creates a new sorted wrapper, sorting by BytesRef
(ascending) then cost (ascending).
Declaration
public SortedInputIterator(IInputIterator source, IComparer<BytesRef> comparer)
Parameters
Type |
Name |
Description |
IInputIterator |
source |
|
IComparer<BytesRef> |
comparer |
|
Properties
|
Improve this Doc
View Source
Declaration
public virtual IComparer<BytesRef> Comparer { get; }
Property Value
Type |
Description |
IComparer<BytesRef> |
|
|
Improve this Doc
View Source
Contexts
Declaration
public virtual IEnumerable<BytesRef> Contexts { get; }
Property Value
Type |
Description |
IEnumerable<BytesRef> |
|
|
Improve this Doc
View Source
HasContexts
Declaration
public virtual bool HasContexts { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public virtual bool HasPayloads { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public virtual BytesRef Payload { get; }
Property Value
Type |
Description |
BytesRef |
|
|
Improve this Doc
View Source
Declaration
public virtual long Weight { get; }
Property Value
Type |
Description |
System.Int64 |
|
Methods
|
Improve this Doc
View Source
decodes the weight at the current position
Declaration
protected virtual long Decode(BytesRef scratch, ByteArrayDataInput tmpInput)
Parameters
Type |
Name |
Description |
BytesRef |
scratch |
|
ByteArrayDataInput |
tmpInput |
|
Returns
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
DecodeContexts(BytesRef, ByteArrayDataInput)
decodes the contexts at the current position
Declaration
protected virtual ISet<BytesRef> DecodeContexts(BytesRef scratch, ByteArrayDataInput tmpInput)
Parameters
Type |
Name |
Description |
BytesRef |
scratch |
|
ByteArrayDataInput |
tmpInput |
|
Returns
Type |
Description |
ISet<BytesRef> |
|
|
Improve this Doc
View Source
decodes the payload at the current position
Declaration
protected virtual BytesRef DecodePayload(BytesRef scratch, ByteArrayDataInput tmpInput)
Parameters
Type |
Name |
Description |
BytesRef |
scratch |
|
ByteArrayDataInput |
tmpInput |
|
Returns
Type |
Description |
BytesRef |
|
|
Improve this Doc
View Source
encodes an entry (bytes+(contexts)+(payload)+weight) to the provided writer
Declaration
protected virtual void Encode(OfflineSorter.ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, BytesRef payload, IEnumerable<BytesRef> contexts, long weight)
Parameters
Type |
Name |
Description |
OfflineSorter.ByteSequencesWriter |
writer |
|
ByteArrayDataOutput |
output |
|
System.Byte[] |
buffer |
|
BytesRef |
spare |
|
BytesRef |
payload |
|
IEnumerable<BytesRef> |
contexts |
|
System.Int64 |
weight |
|
|
Improve this Doc
View Source
Declaration
public virtual BytesRef Next()
Returns
Type |
Description |
BytesRef |
|
Implements
IBytesRefIterator