/// <summary>
        /// Deletes permanently an index
        /// </summary>
        /// <returns></returns>
        public Task DeleteIndexAsync(string indexName)
        {
            if (_indexManager.Exists(indexName))
            {
                _indexManager.DeleteIndex(indexName);
            }

            return(_luceneIndexSettingsService.DeleteIndexAsync(indexName));
        }
        /// <summary>
        /// Deletes and recreates the full index content.
        /// </summary>
        public void RebuildIndex(string indexName)
        {
            _indexManager.DeleteIndex(indexName);
            _indexManager.CreateIndex(indexName);

            ResetIndex(indexName);
        }