it.unimi.di.mg4j.index
Class FileIndex
java.lang.Object
it.unimi.di.mg4j.index.Index
it.unimi.di.mg4j.index.BitStreamIndex
it.unimi.di.mg4j.index.FileIndex
- All Implemented Interfaces:
- Serializable
public class FileIndex
- extends BitStreamIndex
A file-based index.
An instance of this class stores additional index data for indices
based on files: for instance, basename, compression flags, etc.
- Since:
- 0.9
- Author:
- Paolo Boldi, Sebastiano Vigna
- See Also:
- Serialized Form
Fields inherited from class it.unimi.di.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.mg4j.index.Index |
field, hasCounts, hasPayloads, hasPositions, keyIndex, maxCount, numberOfDocuments, numberOfOccurrences, numberOfPostings, numberOfTerms, payload, prefixMap, properties, singletonSet, sizes, termMap, termProcessor |
Constructor Summary |
FileIndex(IOFactory ioFactory,
String basename,
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,
int bufferSize,
TermProcessor termProcessor,
String field,
Properties properties,
StringMap<? extends CharSequence> termMap,
PrefixMap<? extends CharSequence> prefixMap,
IntList sizes,
LongList offsets)
|
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 |
basename
public final String basename
- The basename of this index. All file names will be stemmed from the basename. It may
be
null
.
indexFile
public final String indexFile
- The file containing the index. It may be
null
.
FileIndex
public FileIndex(IOFactory ioFactory,
String basename,
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,
int bufferSize,
TermProcessor termProcessor,
String field,
Properties properties,
StringMap<? extends CharSequence> termMap,
PrefixMap<? extends CharSequence> prefixMap,
IntList sizes,
LongList offsets)
toString
public String toString()
- Overrides:
toString
in class BitStreamIndex
getInputStream
public InputStream getInputStream()
throws IOException
- 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.
- Throws:
IOException
getInputBitStream
public InputBitStream getInputBitStream(int bufferSize)
throws IOException
- Description copied from class:
BitStreamIndex
- Returns an input bit stream over the index.
- Specified by:
getInputBitStream
in class BitStreamIndex
- Parameters:
bufferSize
- a suggested buffer size.
- Returns:
- an input bit stream over the index.
- Throws:
IOException