public static final class BitDocIdSet.Builder extends Object
DocIdSet
s that supports random access. If you don't
need random access, you should rather use DocIdSetBuilder
.Constructor and Description |
---|
BitDocIdSet.Builder(int maxDoc)
Create a new empty instance.
|
BitDocIdSet.Builder(int maxDoc,
boolean full)
Create a new instance that can hold
maxDoc documents and is optionally full . |
Modifier and Type | Method and Description |
---|---|
void |
and(DocIdSetIterator it)
Deprecated.
|
void |
andNot(DocIdSetIterator it)
Deprecated.
|
BitDocIdSet |
build()
Build a
DocIdSet that contains all doc ids that have been added. |
boolean |
isDefinitelyEmpty()
Is this builder definitely empty? If so,
build() will return null. |
void |
or(DocIdSetIterator it)
Add the content of the provided
DocIdSetIterator to this builder. |
public BitDocIdSet.Builder(int maxDoc, boolean full)
maxDoc
documents and is optionally full
.public BitDocIdSet.Builder(int maxDoc)
public boolean isDefinitelyEmpty()
build()
will return null. This is usually the same as
simply being empty but if this builder was constructed with the full
option or if an iterator was passed
that iterated over no documents, then we're not sure.public void or(DocIdSetIterator it) throws IOException
DocIdSetIterator
to this builder.IOException
@Deprecated public void and(DocIdSetIterator it) throws IOException
it
.IOException
@Deprecated public void andNot(DocIdSetIterator it) throws IOException
it
.IOException
public BitDocIdSet build()
DocIdSet
that contains all doc ids that have been added.
This method may return null if no documents were addded to this
builder.
NOTE: this is a destructive operation, the builder should not be used
anymore after this method has been called.Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.