Package it.unimi.di.big.mg4j.index
Class QuasiSuccinctIndexReader
- java.lang.Object
-
- it.unimi.di.big.mg4j.index.AbstractIndexReader
-
- it.unimi.di.big.mg4j.index.QuasiSuccinctIndexReader
-
- All Implemented Interfaces:
IndexReader,SafelyCloseable,Closeable,AutoCloseable
public class QuasiSuccinctIndexReader extends AbstractIndexReader implements IndexReader
An index reader for quasi-succinct indices.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classQuasiSuccinctIndexReader.AbstractQuasiSuccinctIndexIteratorprotected static classQuasiSuccinctIndexReader.CountReaderprotected static classQuasiSuccinctIndexReader.EliasFanoIndexIteratorprotected static classQuasiSuccinctIndexReader.EliasFanoPointerReaderprotected static classQuasiSuccinctIndexReader.LongWordBitReaderprotected static classQuasiSuccinctIndexReader.PointerReaderprotected static classQuasiSuccinctIndexReader.PositionReaderprotected static classQuasiSuccinctIndexReader.RankedIndexIteratorprotected static classQuasiSuccinctIndexReader.RankedPointerReader
-
Field Summary
Fields Modifier and Type Field Description protected LongBigListcountsListA reference to the data for counts, ornullofindexhas counts.protected QuasiSuccinctIndexReader.EliasFanoIndexIteratoreliasFanoIndexIteratorAn index iterator that can read Elias-Fano pointer lists.protected QuasiSuccinctIndexindexThe index, cached.protected LongBigListpointersListA reference to the data for pointers.protected QuasiSuccinctIndexReader.LongWordBitReaderpointersLongWordBitReaderA longword bit reader used to check whether a posting list is ranked or not.protected LongBigListpositionsListA reference to the data for positions, ornullofindexhas positions.protected QuasiSuccinctIndexReader.LongWordBitReaderpositionsLongWordBitReaderA longword bit reader used to retrieve values stored in the list of positions.protected QuasiSuccinctIndexReader.RankedIndexIteratorrankedIndexIteratorAn index iterator that can read ranked pointer lists.-
Fields inherited from class it.unimi.di.big.mg4j.index.AbstractIndexReader
closed
-
-
Constructor Summary
Constructors Constructor Description QuasiSuccinctIndexReader(QuasiSuccinctIndex index)
-
Method Summary
Modifier and Type Method Description IndexIteratordocuments(long termNumber)Returns a document iterator over the documents containing a term.IndexIteratordocuments(CharSequence term)Returns an index iterator over the documents containing a term; the term is given explicitly.IndexIteratornextIterator()Throws anUnsupportedOperationException.-
Methods inherited from class it.unimi.di.big.mg4j.index.AbstractIndexReader
close, finalize
-
-
-
-
Field Detail
-
eliasFanoIndexIterator
protected final QuasiSuccinctIndexReader.EliasFanoIndexIterator eliasFanoIndexIterator
An index iterator that can read Elias-Fano pointer lists.
-
rankedIndexIterator
protected final QuasiSuccinctIndexReader.RankedIndexIterator rankedIndexIterator
An index iterator that can read ranked pointer lists.
-
index
protected final QuasiSuccinctIndex index
The index, cached.
-
pointersList
protected final LongBigList pointersList
A reference to the data for pointers.
-
countsList
protected final LongBigList countsList
A reference to the data for counts, ornullofindexhas counts.
-
positionsList
protected final LongBigList positionsList
A reference to the data for positions, ornullofindexhas positions.
-
pointersLongWordBitReader
protected final QuasiSuccinctIndexReader.LongWordBitReader pointersLongWordBitReader
A longword bit reader used to check whether a posting list is ranked or not.
-
positionsLongWordBitReader
protected final QuasiSuccinctIndexReader.LongWordBitReader positionsLongWordBitReader
A longword bit reader used to retrieve values stored in the list of positions.
-
-
Constructor Detail
-
QuasiSuccinctIndexReader
public QuasiSuccinctIndexReader(QuasiSuccinctIndex index)
-
-
Method Detail
-
documents
public IndexIterator documents(long termNumber) throws IOException
Description copied from interface:IndexReaderReturns a document iterator over the documents containing a term.Note that the index iterator returned by this method will return
nullon a call toterm().Note that it is always possible to call this method with argument 0, even if the underlying index does not provide random access.
- Specified by:
documentsin interfaceIndexReader- Parameters:
termNumber- the number of a term.- Throws:
IOException
-
documents
public IndexIterator documents(CharSequence term) throws IOException
Description copied from interface:IndexReaderReturns an index iterator over the documents containing a term; the term is given explicitly.Unless the term processor of the associated index is
null, words coming from a query will have to be processed before being used with this method.Note that the index iterator returned by this method will return
termon a call toterm().- Specified by:
documentsin interfaceIndexReader- Parameters:
term- a term (the term will be downcased if the index is case insensitive).- Throws:
IOException
-
nextIterator
public IndexIterator nextIterator() throws IOException
Description copied from class:AbstractIndexReaderThrows anUnsupportedOperationException.- Specified by:
nextIteratorin interfaceIndexReader- Overrides:
nextIteratorin classAbstractIndexReader- Returns:
- the index iterator of the next term, or
nullif there are no more terms after the current one. - Throws:
IOException
-
-