| java.lang.Object it.unimi.dsi.mg4j.index.Index it.unimi.dsi.mg4j.index.BitStreamIndex it.unimi.dsi.mg4j.index.MemoryMappedIndex
MemoryMappedIndex | public class MemoryMappedIndex extends BitStreamIndex (Code) | | A local memory-mapped bistream index.
Memory-mapped indices are created by mapping the index file into memory
using a
MappedByteBuffer . The main advantage over an
InMemoryIndex is that only the most frequently used parts of the index will be loaded in core memory.
Note that due to insurmountable Java limitations, it is impossible to map an index larger than
2GiB. However, you can
an index so that
the resulting segments are smaller than 2GiB, and modify the property file of the resulting
cluster so that the URIs of the local indices require memory mapping. This will effectively memory-map
the whole index.
author: Sebastiano Vigna since: 1.2 |
Field Summary | |
final protected ByteBuffer | index The byte buffer containing the index. |
Constructor Summary | |
public | MemoryMappedIndex(ByteBuffer index, int numberOfDocuments, int numberOfTerms, long numberOfPostings, long numberOfOccurrences, int maxCount, Payload payload, Coding frequencyCoding, Coding pointerCoding, Coding countCoding, Coding positionCoding, int quantum, int height, TermProcessor termProcessor, String field, Properties properties, StringMap<? extends CharSequence> termMap, PrefixMap<? extends CharSequence> prefixMap, IntList sizes, LongList offsets) |
index | final protected ByteBuffer index(Code) | | The byte buffer containing the index.
|
MemoryMappedIndex | public MemoryMappedIndex(ByteBuffer index, int numberOfDocuments, int numberOfTerms, long numberOfPostings, long numberOfOccurrences, int maxCount, Payload payload, Coding frequencyCoding, Coding pointerCoding, Coding countCoding, Coding positionCoding, int quantum, int height, TermProcessor termProcessor, String field, Properties properties, StringMap<? extends CharSequence> termMap, PrefixMap<? extends CharSequence> prefixMap, IntList sizes, LongList offsets)(Code) | | |
getInputBitStream | public InputBitStream getInputBitStream(int bufferSizeUnused)(Code) | | |
getInputStream | public ByteBufferInputStream getInputStream()(Code) | | |
Methods inherited from it.unimi.dsi.mg4j.index.Index | public IndexIterator documents(int term) throws IOException(Code)(Java Doc) public IndexIterator documents(CharSequence term) throws IOException(Code)(Java Doc) abstract public IndexIterator documents(CharSequence prefix, int limit) throws IOException, TooManyTermsException(Code)(Java Doc) public static Index getInstance(CharSequence uri, boolean randomAccess, boolean documentSizes, boolean maps) throws IOException, ConfigurationException, URISyntaxException, ClassNotFoundException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) public static Index getInstance(CharSequence uri, boolean randomAccess, boolean documentSizes) throws IOException, ConfigurationException, URISyntaxException, ClassNotFoundException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) public static Index getInstance(CharSequence uri, boolean randomAccess) throws ConfigurationException, IOException, URISyntaxException, ClassNotFoundException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) public static Index getInstance(CharSequence uri) throws ConfigurationException, IOException, URISyntaxException, ClassNotFoundException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException(Code)(Java Doc) public IndexReader getReader() throws IOException(Code)(Java Doc) abstract public IndexReader getReader(int bufferSize) throws IOException(Code)(Java Doc) protected static TermProcessor getTermProcessor(Properties properties)(Code)(Java Doc) public void keyIndex(Index newKeyIndex)(Code)(Java Doc)
|
|
|