Package org.apache.lucene.util
Class WAH8DocIdSet.Builder
java.lang.Object
org.apache.lucene.util.WAH8DocIdSet.Builder
- Enclosing class:
- WAH8DocIdSet
A builder for
WAH8DocIdSets.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(int docID) Add a document to this builder.add(DocIdSetIterator disi) Add the content of the providedDocIdSetIterator.build()Build a newWAH8DocIdSet.setIndexInterval(int indexInterval) Set the index interval.
-
Constructor Details
-
Builder
public Builder()Sole constructor
-
-
Method Details
-
add
Add a document to this builder. Documents must be added in order. -
add
Add the content of the providedDocIdSetIterator.- Throws:
IOException
-
setIndexInterval
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
Build a newWAH8DocIdSet.
-