Class SortedInputEnumerator
This wrapper buffers incoming elements and makes sure they are sorted based on given comparer.
Note
This API is experimental and might change in incompatible ways in the next release.
Inheritance
System.Object
SortedInputEnumerator
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.Search.Suggest
Assembly: Lucene.Net.Suggest.dll
Syntax
public class SortedInputEnumerator : IInputEnumerator, IBytesRefEnumerator
Constructors
| Improve this Doc View SourceSortedInputEnumerator(IInputEnumerator)
Creates a new sorted wrapper, using UTF8SortedAsUnicodeComparer for sorting.
Declaration
public SortedInputEnumerator(IInputEnumerator source)
Parameters
| Type | Name | Description |
|---|---|---|
| IInputEnumerator | source |
SortedInputEnumerator(IInputEnumerator, IComparer<BytesRef>)
Creates a new sorted wrapper, sorting by BytesRef (ascending) then cost (ascending).
Declaration
public SortedInputEnumerator(IInputEnumerator source, IComparer<BytesRef> comparer)
Parameters
| Type | Name | Description |
|---|---|---|
| IInputEnumerator | source | |
| System.Collections.Generic.IComparer<Lucene.Net.Util.BytesRef> | comparer |
Properties
| Improve this Doc View SourceComparer
Declaration
public virtual IComparer<BytesRef> Comparer { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IComparer<Lucene.Net.Util.BytesRef> |
Contexts
Declaration
public virtual ICollection<BytesRef> Contexts { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.ICollection<Lucene.Net.Util.BytesRef> |
Current
Declaration
public virtual BytesRef Current { get; }
Property Value
| Type | Description |
|---|---|
| Lucene.Net.Util.BytesRef |
HasContexts
Declaration
public virtual bool HasContexts { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
HasPayloads
Declaration
public virtual bool HasPayloads { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Payload
Declaration
public virtual BytesRef Payload { get; }
Property Value
| Type | Description |
|---|---|
| Lucene.Net.Util.BytesRef |
Weight
Declaration
public virtual long Weight { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
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 |
|---|---|---|
| Lucene.Net.Util.BytesRef | scratch | |
| Lucene.Net.Store.ByteArrayDataInput | tmpInput |
Returns
| Type | Description |
|---|---|
| System.Int64 |
DecodeContexts(BytesRef, ByteArrayDataInput)
decodes the contexts at the current position
Declaration
protected virtual ISet<BytesRef> DecodeContexts(BytesRef scratch, ByteArrayDataInput tmpInput)
Parameters
| Type | Name | Description |
|---|---|---|
| Lucene.Net.Util.BytesRef | scratch | |
| Lucene.Net.Store.ByteArrayDataInput | tmpInput |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.ISet<Lucene.Net.Util.BytesRef> |
DecodePayload(BytesRef, ByteArrayDataInput)
decodes the payload at the current position
Declaration
protected virtual BytesRef DecodePayload(BytesRef scratch, ByteArrayDataInput tmpInput)
Parameters
| Type | Name | Description |
|---|---|---|
| Lucene.Net.Util.BytesRef | scratch | |
| Lucene.Net.Store.ByteArrayDataInput | tmpInput |
Returns
| Type | Description |
|---|---|
| Lucene.Net.Util.BytesRef |
Encode(OfflineSorter.ByteSequencesWriter, ByteArrayDataOutput, Byte[], BytesRef, BytesRef, ICollection<BytesRef>, Int64)
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, ICollection<BytesRef> contexts, long weight)
Parameters
| Type | Name | Description |
|---|---|---|
| Lucene.Net.Util.OfflineSorter.ByteSequencesWriter | writer | |
| Lucene.Net.Store.ByteArrayDataOutput | output | |
| System.Byte[] | buffer | |
| Lucene.Net.Util.BytesRef | spare | |
| Lucene.Net.Util.BytesRef | payload | |
| System.Collections.Generic.ICollection<Lucene.Net.Util.BytesRef> | contexts | |
| System.Int64 | weight |
MoveNext()
Declaration
public virtual bool MoveNext()
Returns
| Type | Description |
|---|---|
| System.Boolean |
Implements
Lucene.Net.Util.IBytesRefEnumerator