Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.benchmark.standard
Class StandardBenchmarker

    java.lang.Object
      org.apache.lucene.benchmark.AbstractBenchmarker
          org.apache.lucene.benchmark.standard.StandardBenchmarker

All Implemented Interfaces:
  Benchmarker

Deprecated. use the byTask code instead. See http://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightly/javadoc/org/apache/lucene/benchmark/byTask/package-summary.html .

    public class StandardBenchmarker

extends AbstractBenchmarker
implements Benchmarker

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`

Runs a standard set of documents through an Indexer and then runs a standard set of queries against the index.

See Also:
  `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

### SOURCE_DIR

    public static final String SOURCE_DIR

  Deprecated.
  See Also:
    Constant Field Values

### INDEX_DIR

    public static final String INDEX_DIR

  Deprecated.
  See Also:
    Constant Field Values

Constructor Detail

### StandardBenchmarker

    public StandardBenchmarker()

  Deprecated.

Method Detail

### benchmark

    public TestData[] benchmark(File workingDir,
                                BenchmarkOptions opts)
                         throws Exception

  Deprecated.
  Description copied from interface: `Benchmarker`
  Benchmark according to the implementation, using the workingDir as the place to store things.

  Specified by:
    `benchmark` in interface `Benchmarker`
  Parameters:
    `workingDir` - The `File` directory to store temporary data in for running the benchmark
    `opts` - Any `BenchmarkOptions` that are needed for this benchmark. This
  Returns:
    The `TestData` used to run the benchmark.
  Throws:
    `Exception`

### getSourceDirectory

    protected File getSourceDirectory(File workingDir)

  Deprecated.

### runBenchmark

    protected void runBenchmark(TestData params,
                                StandardOptions options)
                         throws Exception

  Deprecated.
  Run benchmark using supplied parameters.

  Parameters:
    `params` - benchmark parameters
  Throws:
    `Exception`

### makeDocument

    protected Document makeDocument(File in,
                                    String[] tags,
                                    boolean stored,
                                    boolean tokenized,
                                    boolean tfv)
                             throws Exception

  Deprecated.
  Parse the Reuters SGML and index: Date, Title, Dateline, Body

  Parameters:
    `in` - input file
  Returns:
    Lucene document
  Throws:
    `Exception`

### makeIndex

    protected void makeIndex(TestRunData trd,
                             File srcDir,
                             IndexWriter iw,
                             boolean stored,
                             boolean tokenized,
                             boolean tfv,
                             StandardOptions options)
                      throws Exception

  Deprecated.
  Make index, and collect time data.

  Parameters:
    `trd` - run data to populate
    `srcDir` - directory with source files
    `iw` - index writer, already open
    `stored` - store values of fields
    `tokenized` - tokenize fields
    `tfv` - store term vectors
  Throws:
    `Exception`

### getAllFiles

    public static void getAllFiles(File srcDir,
                                   FileFilter filter,
                                   List allFiles)

  Deprecated.

### createQueries

    public static Query[] createQueries(List qs,
                                        Analyzer a)

  Deprecated.
  Parse the strings containing Lucene queries.

  Parameters:
    `qs` - array of strings containing query expressions
    `a` - analyzer to use when parsing queries
  Returns:
    array of Lucene queries

### reset

    protected void reset(File indexDir)
                  throws Exception

  Deprecated.
  Remove existing index.

  Throws:
    `Exception`

### saveStream

    protected void saveStream(InputStream is,
                              File out,
                              boolean closeInput)
                       throws Exception

  Deprecated.
  Save a stream to a file.

  Parameters:
    `is` - input stream
    `out` - output file
    `closeInput` - if true, close the input stream when done.
  Throws:
    `Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.