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 java.lang.ObjectA builder forWAH8DocIdSets.
-
-
Constructor Summary
Constructors Constructor Description Builder()Sole constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WAH8DocIdSet.Builderadd(int docID)Add a document to this builder.WAH8DocIdSet.Builderadd(DocIdSetIterator disi)Add the content of the providedDocIdSetIterator.WAH8DocIdSetbuild()Build a newWAH8DocIdSet.WAH8DocIdSet.BuildersetIndexInterval(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 java.io.IOException
Add the content of the providedDocIdSetIterator.- Throws:
java.io.IOException
-
setIndexInterval
public WAH8DocIdSet.Builder setIndexInterval(int indexInterval)
Set the index interval. Smaller index intervals improve performance ofDocIdSetIterator.advance(int)but make theDocIdSetlarger. An index intervalimakes 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_VALUEas an index interval.
-
build
public WAH8DocIdSet build()
Build a newWAH8DocIdSet.
-
-