Class FieldCacheDocIdSet
Base class for DocIdSet to be used with IFieldCache. The implementation
of its iterator is very stupid and slow if the implementation of the
MatchDoc(int) method is not optimized, as iterators simply increment
the document id until MatchDoc(int) returns true
. Because of this
MatchDoc(int) must be as fast as possible and in no case do any
I/O.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public class FieldCacheDocIdSet : DocIdSet
Constructors
FieldCacheDocIdSet(int, IBits)
Base class for DocIdSet to be used with IFieldCache. The implementation
of its iterator is very stupid and slow if the implementation of the
MatchDoc(int) method is not optimized, as iterators simply increment
the document id until MatchDoc(int) returns true
. Because of this
MatchDoc(int) must be as fast as possible and in no case do any
I/O.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
protected FieldCacheDocIdSet(int maxDoc, IBits acceptDocs)
Parameters
Type | Name | Description |
---|---|---|
int | maxDoc | |
IBits | acceptDocs |
FieldCacheDocIdSet(int, IBits, Predicate<int>)
Base class for DocIdSet to be used with IFieldCache. The implementation
of its iterator is very stupid and slow if the implementation of the
MatchDoc(int) method is not optimized, as iterators simply increment
the document id until MatchDoc(int) returns true
. Because of this
MatchDoc(int) must be as fast as possible and in no case do any
I/O.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public FieldCacheDocIdSet(int maxDoc, IBits acceptDocs, Predicate<int> matchDoc)
Parameters
Type | Name | Description |
---|---|---|
int | maxDoc | |
IBits | acceptDocs | |
Predicate<int> | matchDoc |
Fields
m_acceptDocs
Base class for DocIdSet to be used with IFieldCache. The implementation
of its iterator is very stupid and slow if the implementation of the
MatchDoc(int) method is not optimized, as iterators simply increment
the document id until MatchDoc(int) returns true
. Because of this
MatchDoc(int) must be as fast as possible and in no case do any
I/O.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
protected readonly IBits m_acceptDocs
Field Value
Type | Description |
---|---|
IBits |
m_maxDoc
Base class for DocIdSet to be used with IFieldCache. The implementation
of its iterator is very stupid and slow if the implementation of the
MatchDoc(int) method is not optimized, as iterators simply increment
the document id until MatchDoc(int) returns true
. Because of this
MatchDoc(int) must be as fast as possible and in no case do any
I/O.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
protected readonly int m_maxDoc
Field Value
Type | Description |
---|---|
int |
Properties
Bits
Optionally provides a IBits interface for random access to matching documents.
Declaration
public override sealed IBits Bits { get; }
Property Value
Type | Description |
---|---|
IBits |
|
Overrides
IsCacheable
This DocIdSet is always cacheable (does not go back to the reader for iteration)
Declaration
public override sealed bool IsCacheable { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Methods
GetIterator()
Provides a DocIdSetIterator to access the set.
This implementation can return null
if there
are no docs that match.
Declaration
public override sealed DocIdSetIterator GetIterator()
Returns
Type | Description |
---|---|
DocIdSetIterator |
Overrides
MatchDoc(int)
This method checks, if a doc is a hit
Declaration
protected virtual bool MatchDoc(int doc)
Parameters
Type | Name | Description |
---|---|---|
int | doc |
Returns
Type | Description |
---|---|
bool |