当前位置: 首页>>代码示例>>Java>>正文


Java SubmissionReport.report方法代码示例

本文整理汇总了Java中org.apache.lucene.benchmark.quality.utils.SubmissionReport.report方法的典型用法代码示例。如果您正苦于以下问题:Java SubmissionReport.report方法的具体用法?Java SubmissionReport.report怎么用?Java SubmissionReport.report使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.lucene.benchmark.quality.utils.SubmissionReport的用法示例。


在下文中一共展示了SubmissionReport.report方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute

import org.apache.lucene.benchmark.quality.utils.SubmissionReport; //导入方法依赖的package包/类
/**
 * Run the quality benchmark.
 * @param 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. 
 * @param submitRep submission report is created if non null.
 * @param qualityLog If not null, quality run data would be printed for each query.
 * @return QualityStats of each quality query that was executed.
 * @throws Exception if quality benchmark failed to run.
 */
public  QualityStats [] execute(Judge judge, SubmissionReport submitRep, 
                                PrintWriter qualityLog) throws Exception {
  int nQueries = Math.min(maxQueries, qualityQueries.length);
  QualityStats stats[] = new QualityStats[nQueries]; 
  for (int i=0; i<nQueries; i++) {
    QualityQuery qq = qualityQueries[i];
    // generate query
    Query q = qqParser.parse(qq);
    // search with this query 
    long t1 = System.currentTimeMillis();
    TopDocs td = searcher.search(q,null,maxResults);
    long searchTime = System.currentTimeMillis()-t1;
    //most likely we either submit or judge, but check both 
    if (judge!=null) {
      stats[i] = analyzeQueryResults(qq, q, td, judge, qualityLog, searchTime);
    }
    if (submitRep!=null) {
      submitRep.report(qq,td,docNameField,searcher);
    }
  } 
  if (submitRep!=null) {
    submitRep.flush();
  }
  return stats;
}
 
开发者ID:europeana,项目名称:search,代码行数:35,代码来源:QualityBenchmark.java


注:本文中的org.apache.lucene.benchmark.quality.utils.SubmissionReport.report方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。