|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.benchmark.AbstractBenchmarker
org.apache.lucene.benchmark.standard.StandardBenchmarker
public class StandardBenchmarker
Reads in the Reuters Collection, downloaded from http://www.daviddlewis.com/resources/testcollections/reuters21578/reuters21578.tar.gz
in the workingDir/reuters and indexes them using the StandardAnalyzer
benchmark(java.io.File, org.apache.lucene.benchmark.BenchmarkOptions)
Field Summary | |
---|---|
static java.lang.String |
INDEX_DIR
Deprecated. |
static java.lang.String |
SOURCE_DIR
Deprecated. |
Constructor Summary | |
---|---|
StandardBenchmarker()
Deprecated. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.lucene.benchmark.AbstractBenchmarker |
---|
fullyDelete |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SOURCE_DIR
public static final java.lang.String INDEX_DIR
Constructor Detail |
---|
public StandardBenchmarker()
Method Detail |
---|
public TestData[] benchmark(java.io.File workingDir, BenchmarkOptions opts) throws java.lang.Exception
Benchmarker
benchmark
in interface Benchmarker
workingDir
- The File
directory to store temporary data in for running the benchmarkopts
- Any BenchmarkOptions
that are needed for this benchmark. This
TestData
used to run the benchmark.
java.lang.Exception
protected java.io.File getSourceDirectory(java.io.File workingDir)
protected void runBenchmark(TestData params, StandardOptions options) throws java.lang.Exception
params
- benchmark parameters
java.lang.Exception
protected Document makeDocument(java.io.File in, java.lang.String[] tags, boolean stored, boolean tokenized, boolean tfv) throws java.lang.Exception
in
- input file
java.lang.Exception
protected 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 vectors
java.lang.Exception
public 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 queries
protected void reset(java.io.File indexDir) throws java.lang.Exception
java.lang.Exception
protected 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.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |