Class DocMaker
Creates Document objects. Uses a ContentSource to generate DocData objects.
Inheritance
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class DocMaker : IDisposable
Remarks
Supports the following parameters:
- content.sourcespecifies the ContentSource class to use (default SingleDocSource).
- doc.storedspecifies whether fields should be stored (default false).
- doc.body.storedspecifies whether the body field should be stored (default = doc.stored).
- doc.tokenizedspecifies whether fields should be tokenized (default true).
- doc.body.tokenizedspecifies whether the body field should be tokenized (default = doc.tokenized).
- doc.tokenized.normsspecifies whether norms should be stored in the index or not. (default false).
- doc.body.tokenized.norms
specifies whether norms should be stored in the index for the body field.
This can be set to true, while
doc.tokenized.norms
is set to false, to allow norms storing just for the body field. (default true). - doc.term.vectorspecifies whether term vectors should be stored for fields (default false).
- doc.term.vector.positionsspecifies whether term vectors should be stored with positions (default false).
- doc.term.vector.offsetsspecifies whether term vectors should be stored with offsets (default false).
- doc.store.body.bytesspecifies whether to store the raw bytes of the document's content in the document (default false).
- doc.reuse.fieldsspecifies whether Field and Document objects should be reused (default true).
- doc.index.propsspecifies whether the properties returned by
- doc.random.id.limit
if specified, docs will be assigned random
IDs from 0 to this limit. This is useful with UpdateDoc
for testing performance of
. Props will be indexed. (default false).
Constructors
Name | Description |
---|---|
DocMaker() |
Fields
Name | Description |
---|---|
BODY_FIELD | |
BYTES_FIELD | |
DATE_FIELD | |
DATE_MSEC_FIELD | |
ID_FIELD | |
m_bodyValType | |
m_config | |
m_indexProperties | |
m_reuseFields | |
m_source | |
m_valType | |
NAME_FIELD | |
TIME_SEC_FIELD | |
TITLE_FIELD |
Methods
Name | Description |
---|---|
Dispose() | Closes the DocMaker. |
Dispose(Boolean) | Closes the DocMaker. The base implementation closes the
ContentSource, and it can be overridden to do more work (but make
sure to call |
GetDocState() | |
MakeDocument() | Creates a Document object ready for indexing. This method uses the
ContentSource to get the next document from the source, and creates
a Document object from the returned fields. If
|
MakeDocument(Int32) | Same as MakeDocument(), only this method creates a document of the
given size input by |
ResetInputs() | Reset inputs so that the test run would behave, input wise, as if it just started. |
SetConfig(Config, ContentSource) | Set the configuration parameters of this doc maker. |