Class WriteLineDocTask
A task which writes documents, one line per document. Each line is in the following format: title <TAB> date <TAB> body. The output of this task can be consumed by LineDocSource and is intended to save the IO overhead of opening a file per document to be indexed.
Inherited Members
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class WriteLineDocTask : PerfTask
Remarks
The format of the output is set according to the output file extension. Compression is recommended when the output file is expected to be large. See info on file extensions in FileType.
Supports the following parameters:
- line.file.outthe name of the file to write the output to. That parameter is mandatory. NOTE: the file is re-created.
- line.fieldswhich fields should be written in each line. (optional, default: DEFAULT_FIELDS).
- sufficient.fields list of field names, separated by comma, which, if all of them are missing, the document will be skipped. For example, to require that at least one of f1,f2 is not empty, specify: "f1,f2" in this field. To specify that no field is required, i.e. that even empty docs should be emitted, specify "," (optional, default: DEFAULT_SUFFICIENT_FIELDS).
NOTE: this class is not thread-safe and if used by multiple threads the output is unspecified (as all will write to the same output file in a non-synchronized way).
Constructors
Name | Description |
---|---|
WriteLineDocTask(PerfRunData) |
Fields
Name | Description |
---|---|
DEFAULT_FIELDS | Fields to be written by default |
DEFAULT_SUFFICIENT_FIELDS | Default fields which at least one of them is required to not skip the doc. |
FIELDS_HEADER_INDICATOR | |
m_fname | |
SEP |
Properties
Name | Description |
---|---|
SupportsParams |
Methods
Name | Description |
---|---|
Dispose(Boolean) | |
DoLogic() | |
GetLogMessage(Int32) | |
LineFileOut(Document) | Selects output line file by written doc. Default: original output line file. |
SetParams(String) | Set the params (docSize only) |
WriteHeader(TextWriter) | Write header to the lines file - indicating how to read the file later. |