Class QualityBenchmark
Main entry point for running a quality benchmark.
There are two main configurations for running a quality benchmark:- Against existing judgements.
- For submission (e.g. for a contest).
Inherited Members
Namespace: Lucene.Net.Benchmarks.Quality
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class QualityBenchmark
Constructors
QualityBenchmark(QualityQuery[], IQualityQueryParser, IndexSearcher, string)
Create a QualityBenchmark.
Declaration
public QualityBenchmark(QualityQuery[] qqs, IQualityQueryParser qqParser, IndexSearcher searcher, string docNameField)
Parameters
| Type | Name | Description |
|---|---|---|
| QualityQuery[] | qqs | Quality queries to run. |
| IQualityQueryParser | qqParser | Parser for turning QualityQueries into Lucene Queries. |
| IndexSearcher | searcher | Index to be searched. |
| string | docNameField | Name of field containing the document name. This allows to extract the doc name for search results, and is important for judging the results. |
Fields
m_docNameField
index field to extract doc name for each search result; used for judging the results.
Declaration
protected string m_docNameField
Field Value
| Type | Description |
|---|---|
| string |
m_qqParser
Parser for turning QualityQueries into Lucene Queries.
Declaration
protected IQualityQueryParser m_qqParser
Field Value
| Type | Description |
|---|---|
| IQualityQueryParser |
m_qualityQueries
Quality Queries that this quality benchmark would execute.
Declaration
protected QualityQuery[] m_qualityQueries
Field Value
| Type | Description |
|---|---|
| QualityQuery[] |
m_searcher
Index to be searched.
Declaration
protected IndexSearcher m_searcher
Field Value
| Type | Description |
|---|---|
| IndexSearcher |
Properties
MaxQueries
The maximum number of quality queries to run. Useful at debugging.
Declaration
public virtual int MaxQueries { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
MaxResults
The maximum number of results to collect for each quality query.
Declaration
public virtual int MaxResults { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
Execute(IJudge, SubmissionReport, TextWriter)
Run the quality benchmark.
Declaration
public virtual QualityStats[] Execute(IJudge judge, SubmissionReport submitRep, TextWriter qualityLog)
Parameters
| Type | Name | Description |
|---|---|---|
| IJudge | judge | The judge that can tell if a certain result doc is relevant for a certain quality query. If null, no judgements would be made. Usually null for a submission run. |
| SubmissionReport | submitRep | Submission report is created if non null. |
| TextWriter | qualityLog | If not null, quality run data would be printed for each query. |
Returns
| Type | Description |
|---|---|
| QualityStats[] | QualityStats of each quality query that was executed. |
Exceptions
| Type | Condition |
|---|---|
| Exception | If quality benchmark failed to run. |