DocIdSetBuilder

A builder of 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 in order to reserve space, and then call BulkAdder.add on the returned BulkAdder.

Constructors

Link copied to clipboard
constructor(maxDoc: Int)

Create a builder that can contain doc IDs between 0 and maxDoc.

constructor(maxDoc: Int, terms: Terms)

Create a DocIdSetBuilder instance that is optimized for accumulating docs that match the given Terms.

constructor(maxDoc: Int, values: PointValues)

Create a DocIdSetBuilder instance that is optimized for accumulating docs that match the given PointValues.

Types

Link copied to clipboard
interface BulkAdder

Utility class to efficiently add many docs in one go.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Add the content of the provided DocIdSetIterator to this builder. NOTE: if you need to build a DocIdSet out of a single DocIdSetIterator, you should rather use [ ].

Link copied to clipboard

Build a DocIdSet from the accumulated doc IDs.

Link copied to clipboard

Reserve space and return a BulkAdder object that can be used to add up to numDocs documents.