//public IActionResult DeleteIndexes()
        //{
        //    DeleteIndexFiles();
        //    return RedirectToAction("Index");
        //}

        public ActionResult ClearIndex()
        {
            if (_engine.ClearLuceneIndex())
            {
                TempData["Result"] = "Search index was cleared successfully!";
            }
            else
            {
                TempData["ResultFail"] = "Index is locked and cannot be cleared, try again later or clear manually!";
            }
            return(RedirectToAction("Index"));
        }