java.lang.Object
org.apache.lucene.search.AcceptDocs
org.elasticsearch.search.vectors.ESAcceptDocs
- Direct Known Subclasses:
ESAcceptDocs.BitsAcceptDocs,ESAcceptDocs.ESAcceptDocsAll,ESAcceptDocs.ScorerSupplierAcceptDocs
public abstract sealed class ESAcceptDocs
extends org.apache.lucene.search.AcceptDocs
permits ESAcceptDocs.ESAcceptDocsAll, ESAcceptDocs.BitsAcceptDocs, ESAcceptDocs.ScorerSupplierAcceptDocs
An extension of
AcceptDocs that provides additional methods to get an approximate cost
and a BitSet representation of the accepted documents.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn AcceptDocs that wraps a Bits instance.static final classAn AcceptDocs that accepts all documents.static final classAn AcceptDocs that wraps a ScorerSupplier. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intReturns an approximate cost of the accepted documents.abstract Optional<org.apache.lucene.util.BitSet> Returns an optional BitSet representing the accepted documents.Methods inherited from class org.apache.lucene.search.AcceptDocs
bits, cost, fromIteratorSupplier, fromLiveDocs, iterator
-
Constructor Details
-
ESAcceptDocs
public ESAcceptDocs()
-
-
Method Details
-
approximateCost
Returns an approximate cost of the accepted documents. This is generally much cheaper thanAcceptDocs.cost(), as implementations may not fully evaluate filters to provide this estimate and may ignore deletions- Returns:
- the approximate cost
- Throws:
IOException- if an I/O error occurs
-
getBitSet
Returns an optional BitSet representing the accepted documents. If a BitSet representation is not available, returns an empty Optional. An empty optional indicates that there are some accepted documents, but they cannot be represented as a BitSet efficiently. Null implies that all documents are accepted.- Returns:
- an Optional containing the BitSet of accepted documents, or empty if not available, or null if all documents are accepted
- Throws:
IOException- if an I/O error occurs
-