Пример #1
0
 public void RaiseCaptureQueryStatistics(LuceneQueryStatistics statistics)
 {
     if (OnCaptureQueryStatistics != null)
     {
         OnCaptureQueryStatistics(statistics);
     }
 }
        private void RaiseStatisticsCallback(LuceneQueryModel luceneQueryModel, QueryExecutionContext executionContext, TimeSpan elapsedPreparationTime, TimeSpan elapsedSearchTime, TimeSpan elapsedRetrievalTime, int skipResults, int retrievedDocuments)
        {
            var statistics = new LuceneQueryStatistics(executionContext.Query,
                                                       executionContext.Filter,
                                                       luceneQueryModel.Sort,
                                                       elapsedPreparationTime,
                                                       elapsedSearchTime,
                                                       elapsedRetrievalTime,
                                                       executionContext.Hits.TotalHits,
                                                       skipResults, retrievedDocuments);

            luceneQueryModel.RaiseCaptureQueryStatistics(statistics);
        }