it.unimi.di.mg4j.index
Class QuasiSuccinctIndex

java.lang.Object
  extended by it.unimi.di.mg4j.index.Index
      extended by it.unimi.di.mg4j.index.QuasiSuccinctIndex
All Implemented Interfaces:
Serializable

public class QuasiSuccinctIndex
extends Index

A quasi-succinct index.

Note that the methods providing pointers, counts and positions to index readers use reflection to detect whether the LongBigList storing a component is a ByteBufferLongBigList, and in that case they return a copy.

Author:
Sebastiano Vigna
See Also:
Serialized Form

Nested Class Summary
static class QuasiSuccinctIndex.PropertyKeys
          Symbolic names for additional properties of a QuasiSuccinctIndex.
 
Nested classes/interfaces inherited from class it.unimi.di.mg4j.index.Index
Index.EmptyIndexIterator, Index.UriKeys
 
Field Summary
protected  LongList countsOffsets
          The list of offsets into counts.
static int DEFAULT_QUANTUM
          The default quantum.
 int log2Quantum
          The logarithm of the skipping quantum.
protected  LongList pointersOffsets
          The list of offsets into pointers.
protected  LongList positionsOffsets
          The list of offsets into positions.
 
Fields inherited from class it.unimi.di.mg4j.index.Index
field, hasCounts, hasPayloads, hasPositions, keyIndex, maxCount, numberOfDocuments, numberOfOccurrences, numberOfPostings, numberOfTerms, payload, prefixMap, properties, singletonSet, sizes, termMap, termProcessor
 
Constructor Summary
protected QuasiSuccinctIndex(LongBigList index, LongBigList counts, LongBigList positions, int numberOfDocuments, int numberOfTerms, long numberOfPostings, long numberOfOccurrences, int maxCount, Payload payload, int log2Quantum, boolean hasCounts, boolean hasPositions, TermProcessor termProcessor, String field, Properties properties, StringMap<? extends CharSequence> termMap, PrefixMap<? extends CharSequence> prefixMap, IntList sizes, LongList indexOffsets, LongList countsOffsets, LongList positionsOffsets)
           
 
Method Summary
protected  LongBigList getCountsList()
           
protected  LongBigList getPointersList()
           
protected  LongBigList getPositionsList()
           
 IndexReader getReader(int bufferSize)
          Creates and returns a new IndexReader based on this index.
 String toString()
           
 
Methods inherited from class it.unimi.di.mg4j.index.Index
documents, documents, documents, getEmptyIndexIterator, getEmptyIndexIterator, getEmptyIndexIterator, getEmptyIndexIterator, getInstance, getInstance, getInstance, getInstance, getInstance, getReader, getTermProcessor, keyIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_QUANTUM

public static final int DEFAULT_QUANTUM
The default quantum.

See Also:
Constant Field Values

pointersOffsets

protected final LongList pointersOffsets
The list of offsets into pointers.


countsOffsets

protected final LongList countsOffsets
The list of offsets into counts.


positionsOffsets

protected final LongList positionsOffsets
The list of offsets into positions.


log2Quantum

public final int log2Quantum
The logarithm of the skipping quantum.

Constructor Detail

QuasiSuccinctIndex

protected QuasiSuccinctIndex(LongBigList index,
                             LongBigList counts,
                             LongBigList positions,
                             int numberOfDocuments,
                             int numberOfTerms,
                             long numberOfPostings,
                             long numberOfOccurrences,
                             int maxCount,
                             Payload payload,
                             int log2Quantum,
                             boolean hasCounts,
                             boolean hasPositions,
                             TermProcessor termProcessor,
                             String field,
                             Properties properties,
                             StringMap<? extends CharSequence> termMap,
                             PrefixMap<? extends CharSequence> prefixMap,
                             IntList sizes,
                             LongList indexOffsets,
                             LongList countsOffsets,
                             LongList positionsOffsets)
Method Detail

getReader

public IndexReader getReader(int bufferSize)
                      throws IOException
Description copied from class: Index
Creates and returns a new IndexReader based on this index. After that, you can use the reader to read this index.

Specified by:
getReader in class Index
Parameters:
bufferSize - the size of the buffer to be used accessing the reader, or -1 for a default buffer size.
Returns:
a new IndexReader to read this index.
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object

getPointersList

protected LongBigList getPointersList()

getCountsList

protected LongBigList getCountsList()

getPositionsList

protected LongBigList getPositionsList()