Class TermFreqEnumeratorWrapper
Wraps a Lucene.Net.Util.BytesRefEnumerator as a ITermFreqEnumerator, with all weights
set to 1
.
Inherited Members
Namespace: Lucene.Net.Search.Spell
Assembly: Lucene.Net.Suggest.dll
Syntax
public class TermFreqEnumeratorWrapper : ITermFreqEnumerator, IBytesRefEnumerator
Constructors
TermFreqEnumeratorWrapper(IBytesRefEnumerator)
Creates a new wrapper, wrapping the specified iterator and specifying a weight value of
1
for all terms.
Declaration
public TermFreqEnumeratorWrapper(IBytesRefEnumerator wrapped)
Parameters
Type | Name | Description |
---|---|---|
IBytesRefEnumerator | wrapped |
Properties
Comparer
Return the Lucene.Net.Util.BytesRef Comparer used to sort terms provided by the
iterator. This may return null
if there are no items or the iterator is not
sorted. Callers may invoke this method many times, so it's best to cache a
single instance & reuse it.
Declaration
public virtual IComparer<BytesRef> Comparer { get; }
Property Value
Type | Description |
---|---|
IComparer<BytesRef> |
Current
Gets the Lucene.Net.Util.BytesRef for the current iteration. The returned Lucene.Net.Util.BytesRef may be reused across calls to Lucene.Net.Util.IBytesRefEnumerator.MoveNext().
Declaration
public BytesRef Current { get; }
Property Value
Type | Description |
---|---|
BytesRef |
Weight
Gets the term's weight, higher numbers mean better suggestions.
Declaration
public virtual long Weight { get; }
Property Value
Type | Description |
---|---|
long |
Methods
MoveNext()
Increments the iteration to the next Lucene.Net.Util.BytesRef in the enumerator.
Declaration
public bool MoveNext()
Returns
Type | Description |
---|---|
bool |
|
Exceptions
Type | Condition |
---|---|
IOException | If there is a low-level I/O error. |