Package it.unimi.di.big.mg4j.index
Class InMemoryIndex
- java.lang.Object
-
- it.unimi.di.big.mg4j.index.Index
-
- it.unimi.di.big.mg4j.index.BitStreamIndex
-
- it.unimi.di.big.mg4j.index.InMemoryIndex
-
- All Implemented Interfaces:
Serializable
public class InMemoryIndex extends BitStreamIndex
A local bitstream index loaded in memory.In-memory indices are created by loading into main memory an index.
- Since:
- 1.1
- Author:
- Sebastiano Vigna
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class it.unimi.di.big.mg4j.index.BitStreamIndex
BitStreamIndex.PropertyKeys
-
Nested classes/interfaces inherited from class it.unimi.di.big.mg4j.index.Index
Index.EmptyIndexIterator, Index.UriKeys
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]indexThe byte array containing the index.-
Fields inherited from class it.unimi.di.big.mg4j.index.BitStreamIndex
bufferSize, countCoding, DEFAULT_BUFFER_SIZE, DEFAULT_FIXED_QUANTUM, DEFAULT_HEIGHT, DEFAULT_QUANTUM, FIXED_POINT_BITS, FIXED_POINT_MULTIPLIER, frequencyCoding, height, offsets, pointerCoding, positionCoding, quantum, readerConstructor
-
Fields inherited from class it.unimi.di.big.mg4j.index.Index
field, hasCounts, hasPayloads, hasPositions, keyIndex, maxCount, numberOfDocuments, numberOfOccurrences, numberOfPostings, numberOfTerms, payload, prefixMap, properties, singletonSet, sizes, termMap, termProcessor
-
-
Constructor Summary
Constructors Constructor Description InMemoryIndex(byte[] index, long numberOfDocuments, long 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, IntBigList sizes, LongBigList offsets)
-
Method Summary
Modifier and Type Method Description InputBitStreamgetInputBitStream(int bufferSizeUnused)Returns an input bit stream over the index.InputStreamgetInputStream()Returns an input stream over the index.StringtoString()-
Methods inherited from class it.unimi.di.big.mg4j.index.BitStreamIndex
featureName, gaussianGolombModulus, getConstructor, getReader, golombModulus, quantumSigma
-
Methods inherited from class it.unimi.di.big.mg4j.index.Index
documents, documents, documents, getEmptyIndexIterator, getEmptyIndexIterator, getEmptyIndexIterator, getEmptyIndexIterator, getInstance, getInstance, getInstance, getInstance, getInstance, getReader, getTermProcessor, keyIndex
-
-
-
-
Constructor Detail
-
InMemoryIndex
public InMemoryIndex(byte[] index, long numberOfDocuments, long 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, IntBigList sizes, LongBigList offsets)
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toStringin classBitStreamIndex
-
getInputBitStream
public InputBitStream getInputBitStream(int bufferSizeUnused)
Description copied from class:BitStreamIndexReturns an input bit stream over the index.- Specified by:
getInputBitStreamin classBitStreamIndex- Parameters:
bufferSizeUnused- a suggested buffer size.- Returns:
- an input bit stream over the index.
-
getInputStream
public InputStream getInputStream()
Description copied from class:BitStreamIndexReturns an input stream over the index.- Specified by:
getInputStreamin classBitStreamIndex- Returns:
- an input stream over the index.
-
-