Package org.apache.lucene.util
Class PForDeltaDocIdSet
- java.lang.Object
-
- org.apache.lucene.search.DocIdSet
-
- org.apache.lucene.util.PForDeltaDocIdSet
-
public final class PForDeltaDocIdSet extends DocIdSet
DocIdSetimplementation 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
Nested Classes Modifier and Type Class Description static classPForDeltaDocIdSet.BuilderA builder forPForDeltaDocIdSet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcardinality()Return the number of documents in thisDocIdSetin constant time.booleanisCacheable()This method is a hint forCachingWrapperFilter, if thisDocIdSetshould be cached without copying it.DocIdSetIteratoriterator()Provides aDocIdSetIteratorto access the set.longramBytesUsed()Return the memory usage of this instance.
-
-
-
Method Detail
-
isCacheable
public boolean isCacheable()
Description copied from class:DocIdSetThis method is a hint forCachingWrapperFilter, if thisDocIdSetshould be cached without copying it. The default is to returnfalse. If you have an ownDocIdSetimplementation that does its iteration very effective and fast without doing disk I/O, override this method and returntrue.- Overrides:
isCacheablein classDocIdSet
-
iterator
public DocIdSetIterator iterator()
Description copied from class:DocIdSetProvides aDocIdSetIteratorto access the set. This implementation can returnnullif there are no docs that match.
-
cardinality
public int cardinality()
Return the number of documents in thisDocIdSetin constant time.
-
ramBytesUsed
public long ramBytesUsed()
Return the memory usage of this instance.
-
-