Class FilteredTermsEnum
Abstract class for enumerating a subset of all terms.
Term enumerations are always ordered by
Comparer. Each term in the enumeration is
greater than all that precede it.
Please note:
Consumers of this enumeration cannot
call Seek()
, it is forward only; it throws
System.NotSupportedException when a seeking method
is called.
Inheritance
System.Object
FilteredTermsEnum
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()
Assembly: Lucene.Net.dll
Syntax
public abstract class FilteredTermsEnum : TermsEnum, IBytesRefIterator
Constructors
|
Improve this Doc
View Source
FilteredTermsEnum(TermsEnum)
Creates a filtered TermsEnum on a terms enum.
Declaration
public FilteredTermsEnum(TermsEnum tenum)
Parameters
Type |
Name |
Description |
TermsEnum |
tenum |
the terms enumeration to filter.
|
|
Improve this Doc
View Source
FilteredTermsEnum(TermsEnum, Boolean)
Creates a filtered TermsEnum on a terms enum.
Declaration
public FilteredTermsEnum(TermsEnum tenum, bool startWithSeek)
Parameters
Type |
Name |
Description |
TermsEnum |
tenum |
the terms enumeration to filter.
|
System.Boolean |
startWithSeek |
start with seek
|
Properties
|
Improve this Doc
View Source
Attributes
Declaration
public override AttributeSource Attributes { get; }
Property Value
Overrides
|
Improve this Doc
View Source
Comparer
Declaration
public override IComparer<BytesRef> Comparer { get; }
Property Value
Type |
Description |
System.Collections.Generic.IComparer<BytesRef> |
|
Overrides
|
Improve this Doc
View Source
DocFreq
Declaration
public override int DocFreq { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
Ord
Declaration
public override long Ord { get; }
Property Value
Type |
Description |
System.Int64 |
|
Overrides
|
Improve this Doc
View Source
Term
Declaration
public override BytesRef Term { get; }
Property Value
Overrides
|
Improve this Doc
View Source
TotalTermFreq
Declaration
public override long TotalTermFreq { get; }
Property Value
Type |
Description |
System.Int64 |
|
Overrides
Methods
|
Improve this Doc
View Source
Accept(BytesRef)
Return if term is accepted, not accepted or the iteration should ended
(and possibly seek).
Declaration
protected abstract FilteredTermsEnum.AcceptStatus Accept(BytesRef term)
Parameters
Returns
|
Improve this Doc
View Source
Docs(IBits, DocsEnum, DocsFlags)
Declaration
public override DocsEnum Docs(IBits bits, DocsEnum reuse, DocsFlags flags)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
DocsAndPositions(IBits, DocsAndPositionsEnum, DocsAndPositionsFlags)
Declaration
public override DocsAndPositionsEnum DocsAndPositions(IBits bits, DocsAndPositionsEnum reuse, DocsAndPositionsFlags flags)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
GetTermState()
Returns the filtered enums term state
Declaration
public override TermState GetTermState()
Returns
Overrides
|
Improve this Doc
View Source
Next()
Declaration
public override BytesRef Next()
Returns
Overrides
|
Improve this Doc
View Source
NextSeekTerm(BytesRef)
On the first call to Next() or if Accept(BytesRef) returns
YES_AND_SEEK or NO_AND_SEEK,
this method will be called to eventually seek the underlying TermsEnum
to a new position.
On the first call, currentTerm
will be null
, later
calls will provide the term the underlying enum is positioned at.
This method returns per default only one time the initial seek term
and then null
, so no repositioning is ever done.
Override this method, if you want a more sophisticated TermsEnum,
that repositions the iterator during enumeration.
If this method always returns null
the enum is empty.
Please note:
this method should always provide a greater term
than the last enumerated term, else the behavior of this enum
violates the contract for TermsEnums.
Declaration
protected virtual BytesRef NextSeekTerm(BytesRef currentTerm)
Parameters
Type |
Name |
Description |
BytesRef |
currentTerm |
|
Returns
|
Improve this Doc
View Source
SeekCeil(BytesRef)
this enum does not support seeking!
Declaration
public override TermsEnum.SeekStatus SeekCeil(BytesRef term)
Parameters
Returns
Overrides
Exceptions
Type |
Condition |
System.NotSupportedException |
In general, subclasses do not
support seeking.
|
|
Improve this Doc
View Source
SeekExact(BytesRef)
this enum does not support seeking!
Declaration
public override bool SeekExact(BytesRef term)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
Exceptions
Type |
Condition |
System.NotSupportedException |
In general, subclasses do not
support seeking.
|
|
Improve this Doc
View Source
SeekExact(BytesRef, TermState)
this enum does not support seeking!
Declaration
public override void SeekExact(BytesRef term, TermState state)
Parameters
Overrides
Exceptions
Type |
Condition |
System.NotSupportedException |
In general, subclasses do not
support seeking.
|
|
Improve this Doc
View Source
SeekExact(Int64)
this enum does not support seeking!
Declaration
public override void SeekExact(long ord)
Parameters
Type |
Name |
Description |
System.Int64 |
ord |
|
Overrides
Exceptions
Type |
Condition |
System.NotSupportedException |
In general, subclasses do not
support seeking.
|
|
Improve this Doc
View Source
SetInitialSeekTerm(BytesRef)
Use this method to set the initial BytesRef
to seek before iterating. This is a convenience method for
subclasses that do not override NextSeekTerm(BytesRef).
If the initial seek term is null
(default),
the enum is empty.
You can only use this method, if you keep the default
implementation of NextSeekTerm(BytesRef).
Declaration
protected void SetInitialSeekTerm(BytesRef term)
Parameters
Implements
Extension Methods