|
Terrier IR Platform 1.1.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.gla.terrier.structures.merging.StructureMerger
public class StructureMerger
This class merges the structures created by Terrier, so that we use fewer and larger inverted and direct files.
| Constructor Summary | |
|---|---|
StructureMerger(java.lang.String _filename1,
java.lang.String _filename2)
A constructor that sets the filenames of the inverted files to merge |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
Usage: java uk.ac.gla.terrier.structures.merging.StructureMerger [binary bits] [inverted file 1] [inverted file 2] [output inverted file] |
void |
mergeStructures()
Merges the structures created by terrier. |
void |
setNumberOfBits(int bits)
Sets the number of bits to write or read for binary encoded numbers |
void |
setOutputFilename(java.lang.String _outputName)
Sets the output filename of the merged inverted file |
static void |
writeFieldPostings(int[][] postings,
int firstId,
BitOutputStream output,
int binaryBits)
Writes the given postings to a bit file. |
static void |
writeNoFieldPostings(int[][] postings,
int firstId,
BitOutputStream output)
Writes the given postings to a bit file. |
static void |
writePostings(int[][] postings,
int firstId,
BitOutputStream output,
int binaryBits)
Writes the given postings to a bit file. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StructureMerger(java.lang.String _filename1,
java.lang.String _filename2)
_filename1 - the first inverted file to merge_filename2 - the second inverted file to merge| Method Detail |
|---|
public void setNumberOfBits(int bits)
bits - the number of bits to write or readpublic void setOutputFilename(java.lang.String _outputName)
_outputName - the filename of the merged inverted file
public static void writePostings(int[][] postings,
int firstId,
BitOutputStream output,
int binaryBits)
throws java.io.IOException
postings - the postings list to write.firstId - the first identifier to write. This can be
an id plus one, or the gap of the current id and the previous one.output - the output bit file.
java.io.IOException
public static void writeFieldPostings(int[][] postings,
int firstId,
BitOutputStream output,
int binaryBits)
throws java.io.IOException
postings - the postings list to write.firstId - the first identifier to write. This can be
an id plus one, or the gap of the current id and the previous one.output - the output bit file.
java.io.IOException
public static void writeNoFieldPostings(int[][] postings,
int firstId,
BitOutputStream output)
throws java.io.IOException
postings - the postings list to write.firstId - the first identifier to write. This can be
an id plus one, or the gap of the current id and the previous one.output - the output bit file.
java.io.IOException - if an error occurs during writing to a file.public void mergeStructures()
public static void main(java.lang.String[] args)
Binary bits concerns the number of fields in use in the index.
|
Terrier IR Platform 1.1.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||