Show / Hide Table of Contents

    Class ReadTask

    Read index (abstract) task. Sub classes implement WithSearch, WithWarm, WithTraverse and WithRetrieve

    Inheritance
    System.Object
    PerfTask
    ReadTask
    SearchTask
    SearchTravTask
    SearchWithSortTask
    WarmTask
    Inherited Members
    PerfTask.m_logStep
    PerfTask.m_params
    PerfTask.NEW_LINE
    PerfTask.SetRunInBackground(Int32)
    PerfTask.RunInBackground
    PerfTask.BackgroundDeltaPriority
    PerfTask.Stop
    PerfTask.StopNow()
    PerfTask.Clone()
    PerfTask.Dispose()
    PerfTask.Dispose(Boolean)
    PerfTask.RunAndMaybeStats(Boolean)
    PerfTask.GetName()
    PerfTask.SetName(String)
    PerfTask.RunData
    PerfTask.Depth
    PerfTask.ToString()
    PerfTask.GetLogMessage(Int32)
    PerfTask.ShouldNeverLogAtStart
    PerfTask.ShouldNotRecordStats
    PerfTask.TearDown()
    PerfTask.SupportsParams
    PerfTask.SetParams(String)
    PerfTask.Params
    PerfTask.DisableCounting
    PerfTask.AlgLineNum
    Namespace: Lucene.Net.Benchmarks.ByTask.Tasks
    Assembly: Lucene.Net.Benchmark.dll
    Syntax
    public abstract class ReadTask : PerfTask
    Remarks

    Note: All ReadTasks reuse the reader if it is already open. Otherwise a reader is opened at start and closed at the end.

    The search.num.hits config parameter sets the top number of hits to collect during searching. If print.hits.field is set, then each hit is printed along with the value of that field.

    Other side effects: none.

    Constructors

    | Improve this Doc View Source

    ReadTask(PerfRunData)

    Declaration
    public ReadTask(PerfRunData runData)
    Parameters
    Type Name Description
    PerfRunData runData

    Properties

    | Improve this Doc View Source

    NumHits

    Specify the number of hits to retrieve. Tasks should override this if they want to restrict the number of hits that are collected during searching. Must be greater than 0.

    Returns 10 by default, or search.num.hits config if set.

    Declaration
    public virtual int NumHits { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    NumToHighlight

    The number of documents to highlight. 0 means no docs will be highlighted.

    Declaration
    public virtual int NumToHighlight { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Sort

    Declaration
    public virtual Sort Sort { get; }
    Property Value
    Type Description
    Sort
    | Improve this Doc View Source

    TraversalSize

    Specify the number of hits to traverse. Tasks should override this if they want to restrict the number of hits that are traversed when WithTraverse is true. Must be greater than 0.

    Read task calculates the traversal as: Math.Min(hits.Length, TraversalSize)

    Declaration
    public virtual int TraversalSize { get; }
    Property Value
    Type Description
    System.Int32
    Remarks

    Unless overridden, the return value is .

    | Improve this Doc View Source

    WithCollector

    Declaration
    public virtual bool WithCollector { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    WithMaxScore

    Whether maxScores should be computed (only useful with field sort)

    Declaration
    public virtual bool WithMaxScore { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    WithRetrieve

    Return true if, with search & results traversing, docs should be retrieved.

    Declaration
    public abstract bool WithRetrieve { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    WithScore

    Whether scores should be computed (only useful with field sort)

    Declaration
    public virtual bool WithScore { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    WithSearch

    Return true if search should be performed.

    Declaration
    public abstract bool WithSearch { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    WithTraverse

    Return true if, with search, results should be traversed.

    Declaration
    public abstract bool WithTraverse { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    WithWarm

    Return true if warming should be performed.

    Declaration
    public abstract bool WithWarm { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    | Improve this Doc View Source

    CreateCollector()

    Declaration
    protected virtual ICollector CreateCollector()
    Returns
    Type Description
    ICollector
    | Improve this Doc View Source

    DoLogic()

    Declaration
    public override int DoLogic()
    Returns
    Type Description
    System.Int32
    Overrides
    PerfTask.DoLogic()
    | Improve this Doc View Source

    GetBenchmarkHighlighter(Query)

    Return an appropriate highlighter to be used with highlighting tasks.

    Declaration
    protected virtual BenchmarkHighlighter GetBenchmarkHighlighter(Query q)
    Parameters
    Type Name Description
    Query q
    Returns
    Type Description
    BenchmarkHighlighter
    | Improve this Doc View Source

    GetFieldsToHighlight(Document)

    Define the fields to highlight. Base implementation returns all fields.

    Declaration
    protected virtual ICollection<string> GetFieldsToHighlight(Document document)
    Parameters
    Type Name Description
    Document document

    The Document.

    Returns
    Type Description
    ICollection<System.String>

    An ICollection{string} of Field names.

    | Improve this Doc View Source

    GetQueryMaker()

    Return query maker used for this task.

    Declaration
    public abstract IQueryMaker GetQueryMaker()
    Returns
    Type Description
    IQueryMaker
    | Improve this Doc View Source

    RetrieveDoc(IndexReader, Int32)

    Declaration
    protected virtual Document RetrieveDoc(IndexReader ir, int id)
    Parameters
    Type Name Description
    IndexReader ir
    System.Int32 id
    Returns
    Type Description
    Document
    | Improve this Doc View Source

    Setup()

    Declaration
    public override void Setup()
    Overrides
    PerfTask.Setup()
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)