|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.labs.minion.test.regression.MPIndexTest
public class MPIndexTest
Multi-threaded index and test. Indexes a directory of documents, using a config file with multiple pipleines, then inverts the index into an output directory and compares against the original files.
Field Summary | |
---|---|
protected static java.lang.String |
charEnc
The character encoding |
protected java.lang.String |
cmFile
The filename of the configuration file if provided on the command line args |
protected java.io.File |
documentDirectory
The directory containing the documents to be indexed |
protected SearchEngineImpl |
engine
A search engine |
protected java.lang.String |
indexDir
The directory to contain the index |
protected java.util.logging.Logger |
logger
The log onto which messages should be written |
protected static java.lang.String |
logTag
Tag for the log |
protected java.io.File |
outputDirectory
The directory into which the de-indexed files should be written |
Constructor Summary | |
---|---|
MPIndexTest()
Default contructor. |
|
MPIndexTest(java.lang.String indexDir,
java.lang.String cmFile,
java.lang.String dDir,
java.lang.String oDir)
Create a new instance of the test class |
Method Summary | |
---|---|
protected void |
createSearchEngine(java.lang.String cmFile,
java.lang.String indexDir)
Creates a new instance of a search engines and assigns it to the field |
protected void |
diff()
Compares the files in the output directory to the document directory. |
protected boolean |
diff(java.lang.String filename)
Compare one file with another and return a result indicating if they are the same. |
protected void |
invert()
Takes the index and reproduces the documents that produced it. The documents are reproduced into the output directory, with any files already there being deleted. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.lang.String charEnc
protected static java.lang.String logTag
protected java.util.logging.Logger logger
protected java.io.File documentDirectory
protected SearchEngineImpl engine
protected java.io.File outputDirectory
protected java.lang.String indexDir
protected java.lang.String cmFile
Constructor Detail |
---|
public MPIndexTest(java.lang.String indexDir, java.lang.String cmFile, java.lang.String dDir, java.lang.String oDir) throws java.io.FileNotFoundException
indexDir
- the location of the index directorycmFile
- the file name for the configuration filedDir
- the name of the document directoryoDir
- the name of the output directory
java.io.FileNotFoundException
public MPIndexTest()
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- protected void invert() throws java.io.IOException
java.io.IOException
protected boolean diff(java.lang.String filename) throws java.io.IOException
filename
- the name of the file to compare
java.io.IOException
protected void diff() throws java.io.IOException
java.io.IOException
protected void createSearchEngine(java.lang.String cmFile, java.lang.String indexDir)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |