public class StandardBenchmarker extends AbstractBenchmarker implements Benchmarker
StandardAnalyzer
Runs a standard set of documents through an Indexer and then runs a standard set of queries against the index.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
INDEX_DIR
Deprecated.
|
static java.lang.String |
SOURCE_DIR
Deprecated.
|
| Constructor and Description |
|---|
StandardBenchmarker()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
TestData[] |
benchmark(java.io.File workingDir,
BenchmarkOptions opts)
Deprecated.
Benchmark according to the implementation, using the workingDir as the place to store things.
|
static Query[] |
createQueries(java.util.List qs,
Analyzer a)
Deprecated.
Parse the strings containing Lucene queries.
|
static void |
getAllFiles(java.io.File srcDir,
java.io.FileFilter filter,
java.util.List allFiles)
Deprecated.
|
protected java.io.File |
getSourceDirectory(java.io.File workingDir)
Deprecated.
|
protected Document |
makeDocument(java.io.File in,
java.lang.String[] tags,
boolean stored,
boolean tokenized,
boolean tfv)
Deprecated.
Parse the Reuters SGML and index:
Date, Title, Dateline, Body
|
protected void |
makeIndex(TestRunData trd,
java.io.File srcDir,
IndexWriter iw,
boolean stored,
boolean tokenized,
boolean tfv,
StandardOptions options)
Deprecated.
Make index, and collect time data.
|
protected void |
reset(java.io.File indexDir)
Deprecated.
Remove existing index.
|
protected void |
runBenchmark(TestData params,
StandardOptions options)
Deprecated.
Run benchmark using supplied parameters.
|
protected void |
saveStream(java.io.InputStream is,
java.io.File out,
boolean closeInput)
Deprecated.
Save a stream to a file.
|
fullyDeletepublic static final java.lang.String SOURCE_DIR
public static final java.lang.String INDEX_DIR
public TestData[] benchmark(java.io.File workingDir, BenchmarkOptions opts) throws java.lang.Exception
Benchmarkerbenchmark in interface BenchmarkerworkingDir - The File directory to store temporary data in for running the benchmarkopts - Any BenchmarkOptions that are needed for this benchmark. ThisTestData used to run the benchmark.java.lang.Exceptionprotected java.io.File getSourceDirectory(java.io.File workingDir)
protected void runBenchmark(TestData params, StandardOptions options) throws java.lang.Exception
params - benchmark parametersjava.lang.Exceptionprotected Document makeDocument(java.io.File in, java.lang.String[] tags, boolean stored, boolean tokenized, boolean tfv) throws java.lang.Exception
in - input filejava.lang.Exceptionprotected void makeIndex(TestRunData trd, java.io.File srcDir, IndexWriter iw, boolean stored, boolean tokenized, boolean tfv, StandardOptions options) throws java.lang.Exception
trd - run data to populatesrcDir - directory with source filesiw - index writer, already openstored - store values of fieldstokenized - tokenize fieldstfv - store term vectorsjava.lang.Exceptionpublic static void getAllFiles(java.io.File srcDir,
java.io.FileFilter filter,
java.util.List allFiles)
public static Query[] createQueries(java.util.List qs, Analyzer a)
qs - array of strings containing query expressionsa - analyzer to use when parsing queriesprotected void reset(java.io.File indexDir)
throws java.lang.Exception
java.lang.Exceptionprotected void saveStream(java.io.InputStream is,
java.io.File out,
boolean closeInput)
throws java.lang.Exception
is - input streamout - output filecloseInput - if true, close the input stream when done.java.lang.ExceptionCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.