public final class DocIdSetBuilder extends Object
DocIdSets.  At first it uses a sparse structure to gather
 documents, and then upgrades to a non-sparse bit set once enough hits match.
 To add documents, you first need to call grow(int) in order to reserve
 space, and then call DocIdSetBuilder.BulkAdder.add(int) on the returned
 DocIdSetBuilder.BulkAdder.| Modifier and Type | Class and Description | 
|---|---|
| static class  | DocIdSetBuilder.BulkAdderUtility class to efficiently add many docs in one go. | 
| Constructor and Description | 
|---|
| DocIdSetBuilder(int maxDoc)Create a builder that can contain doc IDs between  0andmaxDoc. | 
| DocIdSetBuilder(int maxDoc,
               PointValues values,
               String field)Create a  DocIdSetBuilderinstance that is optimized for
  accumulating docs that match the givenPointValues. | 
| DocIdSetBuilder(int maxDoc,
               Terms terms)Create a  DocIdSetBuilderinstance that is optimized for
  accumulating docs that match the givenTerms. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | add(DocIdSetIterator iter)Add the content of the provided  DocIdSetIteratorto this builder. | 
| DocIdSet | build()Build a  DocIdSetfrom the accumulated doc IDs. | 
| DocIdSetBuilder.BulkAdder | grow(int numDocs)Reserve space and return a  DocIdSetBuilder.BulkAdderobject that can be used to
 add up tonumDocsdocuments. | 
public DocIdSetBuilder(int maxDoc)
0 and maxDoc.public DocIdSetBuilder(int maxDoc,
                       Terms terms)
                throws IOException
DocIdSetBuilder instance that is optimized for
  accumulating docs that match the given Terms.IOExceptionpublic DocIdSetBuilder(int maxDoc,
                       PointValues values,
                       String field)
                throws IOException
DocIdSetBuilder instance that is optimized for
  accumulating docs that match the given PointValues.IOExceptionpublic void add(DocIdSetIterator iter) throws IOException
DocIdSetIterator to this builder.
 NOTE: if you need to build a DocIdSet out of a single
 DocIdSetIterator, you should rather use RoaringDocIdSet.Builder.IOExceptionpublic DocIdSetBuilder.BulkAdder grow(int numDocs)
DocIdSetBuilder.BulkAdder object that can be used to
 add up to numDocs documents.Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.