|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.benchmark.quality.QualityBenchmark
public class QualityBenchmark
Main entry point for running a quality benchmark.
There are two main configurations for running a quality benchmark:
Judge
.
The second configuration requires a non null
SubmissionLogger
.
Field Summary | |
---|---|
protected String |
docNameField
index field to extract doc name for each search result; used for judging the results. |
protected QualityQueryParser |
qqParser
Parser for turning QualityQueries into Lucene Queries. |
protected QualityQuery[] |
qualityQueries
Quality Queries that this quality benchmark would execute. |
protected Searcher |
searcher
Index to be searched. |
Constructor Summary | |
---|---|
QualityBenchmark(QualityQuery[] qqs,
QualityQueryParser qqParser,
Searcher searcher,
String docNameField)
Create a QualityBenchmark. |
Method Summary | |
---|---|
QualityStats[] |
execute(Judge judge,
SubmissionReport submitRep,
PrintWriter qualityLog)
Run the quality benchmark. |
int |
getMaxQueries()
|
int |
getMaxResults()
|
void |
setMaxQueries(int maxQueries)
Set the maximum number of quality queries to run. |
void |
setMaxResults(int maxResults)
set the maximum number of results to collect for each quality query. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected QualityQuery[] qualityQueries
protected QualityQueryParser qqParser
protected Searcher searcher
protected String docNameField
Constructor Detail |
---|
public QualityBenchmark(QualityQuery[] qqs, QualityQueryParser qqParser, Searcher searcher, String docNameField)
qqs
- quality queries to run.qqParser
- parser for turning QualityQueries into Lucene Queries.searcher
- index to be searched.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.Method Detail |
---|
public QualityStats[] execute(Judge judge, SubmissionReport submitRep, PrintWriter qualityLog) throws Exception
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.submitRep
- submission report is created if non null.qualityLog
- If not null, quality run data would be printed for each query.
Exception
- if quality benchmark failed to run.public int getMaxQueries()
public void setMaxQueries(int maxQueries)
public int getMaxResults()
public void setMaxResults(int maxResults)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |