public class Merge extends Combine
This class merges indices by performing a simple ordered list merge. Documents appearing in two indices will cause an error.
Combine.GammaCodedIntIterator, Combine.IndexType| Modifier and Type | Field and Description |
|---|---|
protected int[] |
doc
The reference array of the document queue.
|
protected IntHeapSemiIndirectPriorityQueue |
documentQueue
The queue containing document pointers (for remapped indices).
|
additionalProperties, bufferSize, DEFAULT_BUFFER_SIZE, frequency, hasCounts, hasPayloads, hasPositions, haveSumsMaxPos, index, indexIterator, indexReader, indexWriter, inputBasename, ioFactory, maxCount, metadataOnly, needsSizes, numberOfDocuments, numberOfOccurrences, numIndices, outputBasename, p, positionArray, predictedLengthNumBits, predictedSize, quasiSuccinctIndexWriter, size, sumsMaxPos, termQueue, usedIndex, variableQuantumIndexWriter| Constructor and Description |
|---|
Merge(IOFactory ioFactory,
String outputBasename,
String[] inputBasename,
boolean metadataOnly,
int bufferSize,
Map<CompressionFlags.Component,CompressionFlags.Coding> writerFlags,
Combine.IndexType indexType,
boolean skips,
int quantum,
int height,
int skipBufferOrCacheSize,
long logInterval)
Merges several indices into one.
|
Merge(IOFactory ioFactory,
String outputBasename,
String[] inputBasename,
IntList delete,
boolean metadataOnly,
int bufferSize,
Map<CompressionFlags.Component,CompressionFlags.Coding> writerFlags,
Combine.IndexType indexType,
boolean skips,
int quantum,
int height,
int skipBufferOrCacheSize,
long logInterval)
Merges several indices into one.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
combine(int numUsedIndices,
long occurrency)
Combines several indices.
|
protected int |
combineNumberOfDocuments()
Combines the number of documents.
|
protected int |
combineSizes(OutputBitStream sizesOutputBitStream)
Combines size lists.
|
static void |
main(String[] arg) |
protected int[] doc
protected IntHeapSemiIndirectPriorityQueue documentQueue
public Merge(IOFactory ioFactory, String outputBasename, String[] inputBasename, boolean metadataOnly, int bufferSize, Map<CompressionFlags.Component,CompressionFlags.Coding> writerFlags, Combine.IndexType indexType, boolean skips, int quantum, int height, int skipBufferOrCacheSize, long logInterval) throws IOException, ConfigurationException, URISyntaxException, ClassNotFoundException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
ioFactory - the factory that will be used to perform I/O.outputBasename - the basename of the combined index.inputBasename - the basenames of the input indices.metadataOnly - if true, we save only metadata (term list, frequencies, global counts).bufferSize - the buffer size for index readers.writerFlags - the flags for the index writer.indexType - the type of the index to build.skips - whether to insert skips in case interleaved is true.quantum - the quantum of skipping structures; if negative, a percentage of space for variable-quantum indices (irrelevant if skips is false).height - the height of skipping towers (irrelevant if skips is false).skipBufferOrCacheSize - the size of the buffer used to hold temporarily inverted lists during the skipping structure construction, or the size of the bit cache used when
building a quasi-succinct index.logInterval - how often we log.IOExceptionConfigurationExceptionURISyntaxExceptionClassNotFoundExceptionSecurityExceptionInstantiationExceptionIllegalAccessExceptionInvocationTargetExceptionNoSuchMethodExceptionpublic Merge(IOFactory ioFactory, String outputBasename, String[] inputBasename, IntList delete, boolean metadataOnly, int bufferSize, Map<CompressionFlags.Component,CompressionFlags.Coding> writerFlags, Combine.IndexType indexType, boolean skips, int quantum, int height, int skipBufferOrCacheSize, long logInterval) throws IOException, ConfigurationException, URISyntaxException, ClassNotFoundException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
ioFactory - the factory that will be used to perform I/O.outputBasename - the basename of the combined index.inputBasename - the basenames of the input indices.delete - a monotonically increasing list of integers representing documents that will be deleted from the output index, or null.metadataOnly - if true, we save only metadata (term list, frequencies, global counts).bufferSize - the buffer size for index readers.writerFlags - the flags for the index writer.indexType - the type of the index to build.skips - whether to insert skips in case interleaved is true.quantum - the quantum of skipping structures; if negative, a percentage of space for variable-quantum indices (irrelevant if skips is false).height - the height of skipping towers (irrelevant if skips is false).skipBufferOrCacheSize - the size of the buffer used to hold temporarily inverted lists during the skipping structure construction, or the size of the bit cache used when
building a quasi-succinct index.logInterval - how often we log.IOExceptionConfigurationExceptionURISyntaxExceptionClassNotFoundExceptionSecurityExceptionInstantiationExceptionIllegalAccessExceptionInvocationTargetExceptionNoSuchMethodExceptionprotected int combineNumberOfDocuments()
CombinecombineNumberOfDocuments in class Combineprotected int combineSizes(OutputBitStream sizesOutputBitStream) throws IOException
CombinecombineSizes in class CombineIOExceptionprotected int combine(int numUsedIndices,
long occurrency)
throws IOException
CombineWhen this method is called, exactly numUsedIndices entries
of Combine.usedIndex contain, in increasing order, the indices containing
inverted lists for the current term. Implementations of this method must
combine the inverted list and return the total frequency.
combine in class CombinenumUsedIndices - the number of valid entries in Combine.usedIndex.occurrency - the occurrency of the term (used only when building Combine.IndexType.QUASI_SUCCINCT indices).IOExceptionpublic static void main(String[] arg) throws ConfigurationException, SecurityException, com.martiansoftware.jsap.JSAPException, IOException, URISyntaxException, ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
ConfigurationExceptionSecurityExceptioncom.martiansoftware.jsap.JSAPExceptionIOExceptionURISyntaxExceptionClassNotFoundExceptionInstantiationExceptionIllegalAccessExceptionInvocationTargetExceptionNoSuchMethodException