Class DocIdSetBuilder

  • public final class DocIdSetBuilder
    extends Object
    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(int) in order to reserve space, and then call DocIdSetBuilder.BulkAdder.add(int) on the returned DocIdSetBuilder.BulkAdder.

    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.