org.apache.lucene.util
Class PForDeltaDocIdSet

java.lang.Object
  extended by org.apache.lucene.search.DocIdSet
      extended by org.apache.lucene.util.PForDeltaDocIdSet

public final class PForDeltaDocIdSet
extends DocIdSet

DocIdSet implementation based on pfor-delta encoding.

This implementation is inspired from LinkedIn's Kamikaze (http://data.linkedin.com/opensource/kamikaze) and Daniel Lemire's JavaFastPFOR (https://github.com/lemire/JavaFastPFOR).

On the contrary to the original PFOR paper, exceptions are encoded with FOR instead of Simple16.


Nested Class Summary
static class PForDeltaDocIdSet.Builder
          A builder for PForDeltaDocIdSet.
 
Method Summary
 int cardinality()
          Return the number of documents in this DocIdSet in constant time.
 boolean isCacheable()
          This method is a hint for CachingWrapperFilter, if this DocIdSet should be cached without copying it into a BitSet.
 DocIdSetIterator iterator()
          Provides a DocIdSetIterator to access the set.
 long ramBytesUsed()
          Return the memory usage of this instance.
 
Methods inherited from class org.apache.lucene.search.DocIdSet
bits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isCacheable

public boolean isCacheable()
Description copied from class: DocIdSet
This method is a hint for CachingWrapperFilter, if this DocIdSet should be cached without copying it into a BitSet. The default is to return false. If you have an own DocIdSet implementation that does its iteration very effective and fast without doing disk I/O, override this method and return true.

Overrides:
isCacheable in class DocIdSet

iterator

public DocIdSetIterator iterator()
Description copied from class: DocIdSet
Provides a DocIdSetIterator to access the set. This implementation can return null if there are no docs that match.

Specified by:
iterator in class DocIdSet

cardinality

public int cardinality()
Return the number of documents in this DocIdSet in constant time.


ramBytesUsed

public long ramBytesUsed()
Return the memory usage of this instance.



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