Package org.apache.lucene.util
Class WAH8DocIdSet.Builder
- java.lang.Object
-
- org.apache.lucene.util.WAH8DocIdSet.Builder
-
- Enclosing class:
- WAH8DocIdSet
public static final class WAH8DocIdSet.Builder extends Object
A builder forWAH8DocIdSet
s.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Sole constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WAH8DocIdSet.Builder
add(int docID)
Add a document to this builder.WAH8DocIdSet.Builder
add(DocIdSetIterator disi)
Add the content of the providedDocIdSetIterator
.WAH8DocIdSet
build()
Build a newWAH8DocIdSet
.WAH8DocIdSet.Builder
setIndexInterval(int indexInterval)
Set the index interval.
-
-
-
Method Detail
-
add
public WAH8DocIdSet.Builder add(int docID)
Add a document to this builder. Documents must be added in order.
-
add
public WAH8DocIdSet.Builder add(DocIdSetIterator disi) throws IOException
Add the content of the providedDocIdSetIterator
.- Throws:
IOException
-
setIndexInterval
public WAH8DocIdSet.Builder setIndexInterval(int indexInterval)
Set the index interval. Smaller index intervals improve performance ofDocIdSetIterator.advance(int)
but make theDocIdSet
larger. An index intervali
makes the index add an overhead which is at most4/i
, but likely much less.The default index interval is8
, meaning the index has an overhead of at most 50%. To disable indexing, you can passInteger.MAX_VALUE
as an index interval.
-
build
public WAH8DocIdSet build()
Build a newWAH8DocIdSet
.
-
-