private async Task <LuceneInfoModel> GetLuceneInfo() { var model = new LuceneInfoModel { Directory = IndexingService.IndexPath, IsLocal = IndexingService.IsLocal, Location = Config.LuceneIndexLocation }; try { model.LastUpdated = await IndexingService.GetLastWriteTime(); model.DocumentCount = await IndexingService.GetDocumentCount(); model.IndexSize = await IndexingService.GetIndexSizeInBytes(); model.QueryStats = PerfCounters.GetStats(ExternalSearchService.SearchRoundtripTimePerfCounter); } catch (FileNotFoundException) { model.LastUpdated = null; } return(model); }
// // GET: /Admin/Lucene/ public virtual ActionResult Index() { return(View("Index", new LuceneInfoModel() { LastUpdated = IndexingService.GetLastWriteTime(), DocumentCount = IndexingService.GetDocumentCount(), IndexSize = IndexingService.GetIndexSizeInBytes(), Directory = IndexingService.IndexPath, Location = Config.LuceneIndexLocation })); }