Package org.apache.lucene.util
Class RoaringDocIdSet.Builder
java.lang.Object
org.apache.lucene.util.RoaringDocIdSet.Builder
- Enclosing class:
RoaringDocIdSet
A builder of
RoaringDocIdSets.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(int docId) Add a new doc-id to this builder.add(int min, int max) Add a contiguous half-open range[min, max)of doc ids.add(DocIdSetIterator disi) Add the content of the providedDocIdSetIterator.build()Build an instance.
-
Constructor Details
-
Builder
public Builder(int maxDoc) Sole constructor.
-
-
Method Details
-
add
Add a new doc-id to this builder. NOTE: doc ids must be added in order. -
add
Add a contiguous half-open range[min, max)of doc ids. Doc ids must remain in non-decreasing order relative to prioradd(int)calls;minmust be strictly greater than the last document added (if any). Equivalent to callingadd(int)for eachmin <= doc < max, but uses a more efficient implementation for dense ranges.- Parameters:
min- inclusive lower bound (must be>= 0)max- exclusive upper bound- Throws:
IllegalArgumentException- ifmin > max, ifmin <= lastDocId, or ifmaxexceedsmaxDoc
-
add
Add the content of the providedDocIdSetIterator.- Throws:
IOException
-
build
Build an instance.
-