it.unimi.di.mg4j.index.remote
Class RemoteBitStreamIndex
java.lang.Object
it.unimi.di.mg4j.index.Index
it.unimi.di.mg4j.index.BitStreamIndex
it.unimi.di.mg4j.index.remote.RemoteBitStreamIndex
- All Implemented Interfaces:
- Serializable
public class RemoteBitStreamIndex
- extends BitStreamIndex
A remote bitstream-based index.
Remote bitstream indices (as opposed to remote indices
export the actual bitstream by means of a reader. Of course, this is possible only if the
remoted indices is a BitStreamIndex
.
- Since:
- 1.1
- Author:
- Sebastiano Vigna
- See Also:
- Serialized Form
Fields inherited from class it.unimi.di.mg4j.index.BitStreamIndex |
bufferSize, countCoding, 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 |
RemoteBitStreamIndex(SocketAddress address,
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 |
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE
- The default buffer size.
- See Also:
- Constant Field Values
address
public final SocketAddress address
- The address of the socket associated with this index.
RemoteBitStreamIndex
public RemoteBitStreamIndex(SocketAddress address,
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)
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
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
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.
- Overrides:
getReader
in class BitStreamIndex
- 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