LineDocMaker (Lucene 2.4.1 API)
Keywords: org.apache.lucene.benchmark.byTask.feeds.LineDocMaker class

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.byTask.feeds
Class LineDocMaker

    java.lang.Object
      org.apache.lucene.benchmark.byTask.feeds.BasicDocMaker
          org.apache.lucene.benchmark.byTask.feeds.LineDocMaker

All Implemented Interfaces:
  DocMaker

Direct Known Subclasses:
  EnwikiDocMaker

    public class LineDocMaker

extends BasicDocMaker

A DocMaker reading one line at a time as a Document from a single file. This saves IO cost (over DirDocMaker) of recursing through a directory and opening a new file for every document. It also re-uses its Document and Field instance to improve indexing speed. Config properties: docs.file=<path to the file%gt; doc.reuse.fields=true|false (default true)

Field Summary

Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.BasicDocMaker
`BODY_FIELD, BYTES_FIELD, config, DATE_FIELD, forever, ID_FIELD, indexVal, NAME_FIELD, storeVal, termVecVal, TITLE_FIELD`

Constructor Summary
`LineDocMaker()`

Method Summary
`protected DocData` | `getNextDocData()` Return the data of the next document.
`Document` | `makeDocument()` Create the next document.
`Document` | `makeDocument(int size)` Create the next document, of the given size by input bytes.
`int` | `numUniqueTexts()` Return how many real unique texts are available, 0 if not applicable.
`void` | `resetInputs()` Reset inputs so that the test run would behave, input wise, as if it just started.
`void` | `setConfig(Config config)` Set the properties

Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.BasicDocMaker
`addBytes, addUniqueBytes, collectFiles, getByteCount, getCount, getHtmlParser, numUniqueBytes, printDocStatistics, resetUniqueBytes, setHTMLParser`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LineDocMaker

    public LineDocMaker()

Method Detail

### getNextDocData

    protected DocData getNextDocData()
                              throws Exception

  Description copied from class: `BasicDocMaker`
  Return the data of the next document. All current implementations can create docs forever. When the input data is exhausted, input files are iterated. This re-iteration can be avoided by setting doc.maker.forever to false (default is true).

  Specified by:
    `getNextDocData` in class `BasicDocMaker`
  Returns:
    data of the next document.
  Throws:
    `NoMoreDataException` - if data is exhausted (and 'forever' set to false).
    `Exception`

### makeDocument

    public Document makeDocument()
                          throws Exception

  Description copied from interface: `DocMaker`
  Create the next document.

  Specified by:
    `makeDocument` in interface `DocMaker`
  Overrides:
    `makeDocument` in class `BasicDocMaker`
  Throws:
    `Exception`

### makeDocument

    public Document makeDocument(int size)
                          throws Exception

  Description copied from interface: `DocMaker`
  Create the next document, of the given size by input bytes. If the implementation does not support control over size, an exception is thrown.

  Specified by:
    `makeDocument` in interface `DocMaker`
  Overrides:
    `makeDocument` in class `BasicDocMaker`
  Parameters:
    `size` - size of document, or 0 if there is no size requirement.
  Throws:
    `Exception`

### resetInputs

    public void resetInputs()

  Description copied from interface: `DocMaker`
  Reset inputs so that the test run would behave, input wise, as if it just started.

  Specified by:
    `resetInputs` in interface `DocMaker`
  Overrides:
    `resetInputs` in class `BasicDocMaker`

### setConfig

    public void setConfig(Config config)

  Description copied from interface: `DocMaker`
  Set the properties

  Specified by:
    `setConfig` in interface `DocMaker`
  Overrides:
    `setConfig` in class `BasicDocMaker`

### numUniqueTexts

    public int numUniqueTexts()

  Description copied from interface: `DocMaker`
  Return how many real unique texts are available, 0 if not applicable.

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-2009 Apache Software Foundation. All Rights Reserved.