Show / Hide Table of Contents

    Class DocMaker

    Creates Document objects. Uses a ContentSource to generate DocData objects.

    Inheritance
    System.Object
    DocMaker
    SpatialDocMaker
    Namespace: Lucene.Net.Benchmarks.ByTask.Feeds
    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

    | Improve this Doc View Source

    DocMaker()

    Declaration
    public DocMaker()

    Fields

    | Improve this Doc View Source

    BODY_FIELD

    Declaration
    public static readonly string BODY_FIELD
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    BYTES_FIELD

    Declaration
    public static readonly string BYTES_FIELD
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    DATE_FIELD

    Declaration
    public static readonly string DATE_FIELD
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    DATE_MSEC_FIELD

    Declaration
    public static readonly string DATE_MSEC_FIELD
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    ID_FIELD

    Declaration
    public static readonly string ID_FIELD
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    m_bodyValType

    Declaration
    protected FieldType m_bodyValType
    Field Value
    Type Description
    FieldType
    | Improve this Doc View Source

    m_config

    Declaration
    protected Config m_config
    Field Value
    Type Description
    Config
    | Improve this Doc View Source

    m_indexProperties

    Declaration
    protected bool m_indexProperties
    Field Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    m_reuseFields

    Declaration
    protected bool m_reuseFields
    Field Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    m_source

    Declaration
    protected ContentSource m_source
    Field Value
    Type Description
    ContentSource
    | Improve this Doc View Source

    m_valType

    Declaration
    protected FieldType m_valType
    Field Value
    Type Description
    FieldType
    | Improve this Doc View Source

    NAME_FIELD

    Declaration
    public static readonly string NAME_FIELD
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    TIME_SEC_FIELD

    Declaration
    public static readonly string TIME_SEC_FIELD
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    TITLE_FIELD

    Declaration
    public static readonly string TITLE_FIELD
    Field Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    Dispose()

    Closes the DocMaker.

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    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 base.Dispose(bool)).

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    | Improve this Doc View Source

    GetDocState()

    Declaration
    protected virtual DocMaker.DocState GetDocState()
    Returns
    Type Description
    DocMaker.DocState
    | Improve this Doc View Source

    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 reuseFields was set to true, it will reuse Document and Field instances.

    Declaration
    public virtual Document MakeDocument()
    Returns
    Type Description
    Document
    | Improve this Doc View Source

    MakeDocument(Int32)

    Same as MakeDocument(), only this method creates a document of the given size input by size.

    Declaration
    public virtual Document MakeDocument(int size)
    Parameters
    Type Name Description
    System.Int32 size
    Returns
    Type Description
    Document
    | Improve this Doc View Source

    ResetInputs()

    Reset inputs so that the test run would behave, input wise, as if it just started.

    Declaration
    public virtual void ResetInputs()
    | Improve this Doc View Source

    SetConfig(Config, ContentSource)

    Set the configuration parameters of this doc maker.

    Declaration
    public virtual void SetConfig(Config config, ContentSource source)
    Parameters
    Type Name Description
    Config config
    ContentSource source
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)