it.unimi.dsi.mg4j.index
Class MemoryMappedHPIndex
java.lang.Object
it.unimi.dsi.mg4j.index.Index
it.unimi.dsi.mg4j.index.BitStreamIndex
it.unimi.dsi.mg4j.index.BitStreamHPIndex
it.unimi.dsi.mg4j.index.MemoryMappedHPIndex
- All Implemented Interfaces:
- Serializable
public class MemoryMappedHPIndex
- extends BitStreamHPIndex
A memory-mapped BitStreamHPIndex
. See the discussion in MemoryMappedIndex
(and consider
that since a high-performance index is actually split in two files, memory mapping is actually easier).
- Since:
- 1.2
- Author:
- Sebastiano Vigna
- See Also:
- Serialized Form
Fields inherited from class it.unimi.dsi.mg4j.index.BitStreamIndex |
bufferSize, countCoding, DEFAULT_BUFFER_SIZE, DEFAULT_HEIGHT, DEFAULT_QUANTUM, FIXED_POINT_BITS, FIXED_POINT_MULTIPLIER, frequencyCoding, height, offsets, pointerCoding, positionCoding, prefixMap, quantum, readerConstructor, termMap |
Fields inherited from class it.unimi.dsi.mg4j.index.Index |
emptyIndexIterator, field, hasCounts, hasPayloads, hasPositions, keyIndex, maxCount, numberOfDocuments, numberOfOccurrences, numberOfPostings, numberOfTerms, payload, properties, singletonSet, sizes, termProcessor |
Constructor Summary |
MemoryMappedHPIndex(ByteBuffer index,
ByteBuffer positions,
int numberOfDocuments,
int numberOfTerms,
long numberOfPostings,
long numberOfOccurrences,
int maxCount,
Payload payload,
CompressionFlags.Coding frequencyCoding,
CompressionFlags.Coding pointerCoding,
CompressionFlags.Coding countCoding,
CompressionFlags.Coding positionCoding,
int quantum,
int height,
TermProcessor termProcessor,
String field,
Properties properties,
StringMap<? extends CharSequence> termMap,
PrefixMap<? extends CharSequence> prefixMap,
IntList sizes,
LongList offsets)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
index
protected final ByteBuffer index
- The byte buffer containing the index.
positions
protected final ByteBuffer positions
- The byte buffer containing the positions.
MemoryMappedHPIndex
public MemoryMappedHPIndex(ByteBuffer index,
ByteBuffer positions,
int numberOfDocuments,
int numberOfTerms,
long numberOfPostings,
long numberOfOccurrences,
int maxCount,
Payload payload,
CompressionFlags.Coding frequencyCoding,
CompressionFlags.Coding pointerCoding,
CompressionFlags.Coding countCoding,
CompressionFlags.Coding positionCoding,
int quantum,
int height,
TermProcessor termProcessor,
String field,
Properties properties,
StringMap<? extends CharSequence> termMap,
PrefixMap<? extends CharSequence> prefixMap,
IntList sizes,
LongList offsets)
getInputBitStream
public InputBitStream getInputBitStream(int bufferSizeUnused)
- Description copied from class:
BitStreamIndex
- Returns an input bit stream over the index.
- Specified by:
getInputBitStream
in class BitStreamIndex
- Parameters:
bufferSizeUnused
- a suggested buffer size.
- Returns:
- an input bit stream over the index.
getInputStream
public ByteBufferInputStream getInputStream()
- Description copied from class:
BitStreamIndex
- Returns an input stream over the index.
- Specified by:
getInputStream
in class BitStreamIndex
- Returns:
- an input stream over the index.
getPositionsInputBitStream
public InputBitStream getPositionsInputBitStream(int bufferSizeUnused)
throws IOException
- Description copied from class:
BitStreamHPIndex
- Returns an input bit stream over the index.
- Specified by:
getPositionsInputBitStream
in class BitStreamHPIndex
- Parameters:
bufferSizeUnused
- a suggested buffer size.
- Returns:
- an input bit stream over the index.
- Throws:
IOException
getPositionsInputStream
public InputStream getPositionsInputStream()
throws IOException
- Description copied from class:
BitStreamHPIndex
- Returns an input stream over the index.
- Specified by:
getPositionsInputStream
in class BitStreamHPIndex
- Returns:
- an input stream over the index.
- Throws:
IOException