public static final class BitDocIdSet.Builder extends Object
DocIdSet
s that supports random access.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)
Removes from this builder documents that are not contained in
it . |
void |
andNot(DocIdSetIterator it)
Removes from this builder documents that are contained in
it . |
BitDocIdSet |
build()
Build a
DocIdSet that contains all doc ids that have been added. |
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 void or(DocIdSetIterator it) throws IOException
DocIdSetIterator
to this builder.IOException
public void and(DocIdSetIterator it) throws IOException
it
.IOException
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-2015 Apache Software Foundation. All Rights Reserved.