org.apache.lucene.util
Class WAH8DocIdSet.Builder

java.lang.Object
  extended by org.apache.lucene.util.WAH8DocIdSet.Builder
Enclosing class:
WAH8DocIdSet

public static final class WAH8DocIdSet.Builder
extends Object

A builder for WAH8DocIdSets.


Constructor Summary
WAH8DocIdSet.Builder()
          Sole constructor
 
Method Summary
 WAH8DocIdSet.Builder add(DocIdSetIterator disi)
          Add the content of the provided DocIdSetIterator.
 WAH8DocIdSet.Builder add(int docID)
          Add a document to this builder.
 WAH8DocIdSet build()
          Build a new WAH8DocIdSet.
 WAH8DocIdSet.Builder setIndexInterval(int indexInterval)
          Set the index interval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WAH8DocIdSet.Builder

public WAH8DocIdSet.Builder()
Sole constructor

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 provided DocIdSetIterator.

Throws:
IOException

setIndexInterval

public WAH8DocIdSet.Builder setIndexInterval(int indexInterval)
Set the index interval. Smaller index intervals improve performance of DocIdSetIterator.advance(int) but make the DocIdSet larger. An index interval i makes the index add an overhead which is at most 4/i, but likely much less.The default index interval is 8, meaning the index has an overhead of at most 50%. To disable indexing, you can pass Integer.MAX_VALUE as an index interval.


build

public WAH8DocIdSet build()
Build a new WAH8DocIdSet.



Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.