org.apache.lucene.benchmark.standard
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 String |
INDEX_DIR
Deprecated.
|
static String |
SOURCE_DIR
Deprecated.
|
Constructor and Description |
---|
StandardBenchmarker()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
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.
|
fullyDelete
public static final String SOURCE_DIR
public static final String INDEX_DIR
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. ThisTestData
used to run the benchmark.Exception
protected void runBenchmark(TestData params, StandardOptions options) throws Exception
params
- benchmark parametersException
protected Document makeDocument(File in, String[] tags, boolean stored, boolean tokenized, boolean tfv) throws Exception
in
- input fileException
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 vectorsException
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 queriesprotected 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
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.