|
||||||||||
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 String |
INDEX_DIR
Deprecated. |
static String |
SOURCE_DIR
Deprecated. |
Constructor Summary | |
---|---|
StandardBenchmarker()
Deprecated. |
Method Summary | |
---|---|
TestData[] |
benchmark(File workingDir,
BenchmarkOptions opts)
Deprecated. Benchmark according to the implementation, using the workingDir as the place to store things. |
static Query[] |
createQueries(List qs,
Analyzer a)
Deprecated. Parse the strings containing Lucene queries. |
static void |
getAllFiles(File srcDir,
FileFilter filter,
List allFiles)
Deprecated. |
protected File |
getSourceDirectory(File workingDir)
Deprecated. |
protected Document |
makeDocument(File in,
String[] tags,
boolean stored,
boolean tokenized,
boolean tfv)
Deprecated. Parse the Reuters SGML and index: Date, Title, Dateline, Body |
protected void |
makeIndex(TestRunData trd,
File srcDir,
IndexWriter iw,
boolean stored,
boolean tokenized,
boolean tfv,
StandardOptions options)
Deprecated. Make index, and collect time data. |
protected void |
reset(File indexDir)
Deprecated. Remove existing index. |
protected void |
runBenchmark(TestData params,
StandardOptions options)
Deprecated. Run benchmark using supplied parameters. |
protected void |
saveStream(InputStream is,
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 String SOURCE_DIR
public static final String INDEX_DIR
Constructor Detail |
---|
public StandardBenchmarker()
Method Detail |
---|
public TestData[] benchmark(File workingDir, BenchmarkOptions opts) throws 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.
Exception
protected File getSourceDirectory(File workingDir)
protected void runBenchmark(TestData params, StandardOptions options) throws Exception
params
- benchmark parameters
Exception
protected Document makeDocument(File in, String[] tags, boolean stored, boolean tokenized, boolean tfv) throws Exception
in
- input file
Exception
protected void makeIndex(TestRunData trd, File srcDir, IndexWriter iw, boolean stored, boolean tokenized, boolean tfv, StandardOptions options) throws Exception
trd
- run data to populatesrcDir
- directory with source filesiw
- index writer, already openstored
- store values of fieldstokenized
- tokenize fieldstfv
- store term vectors
Exception
public static void getAllFiles(File srcDir, FileFilter filter, List allFiles)
public static Query[] createQueries(List qs, Analyzer a)
qs
- array of strings containing query expressionsa
- analyzer to use when parsing queries
protected void reset(File indexDir) throws Exception
Exception
protected void saveStream(InputStream is, File out, boolean closeInput) throws Exception
is
- input streamout
- output filecloseInput
- if true, close the input stream when done.
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |