public void DeleteIndex(string indexName) {
            Argument.ThrowIfNullOrEmpty(indexName, "indexName");

            if (!_indexManager.HasIndexProvider()) {
                Services.Notifier.Warning(T("There is no index to delete."));
                return;
            }

            if (_indexingTaskExecutor.DeleteIndex(indexName)) {
                Services.Notifier.Information(T("The index {0} has been deleted.", indexName));
            }
            else {
                Services.Notifier.Warning(T("The index {0} could not be deleted. It might already be in use, please try again later.", indexName));
            }
        }
Esempio n. 2
0
        public void RebuildIndex(string indexName)
        {
            if (!indexManager.HasIndexProvider())
            {
                notifier.Warning(T(KoreWebLocalizableStrings.Indexing.NoSearchIndexToRebuild));
                return;
            }

            if (indexingTaskExecutor.DeleteIndex(indexName))
            {
                notifier.Info(string.Format(T(KoreWebLocalizableStrings.Indexing.SearchIndexRebuilt), indexName));
                UpdateIndex(indexName);
            }
            else
            {
                notifier.Warning(string.Format(T(KoreWebLocalizableStrings.Indexing.SearchIndexRebuildFail), indexName));
            }
        }
Esempio n. 3
0
        public void RebuildIndex(string indexName)
        {
            if (!indexManager.HasIndexProvider())
            {
                notifier.Warning(T("There is no search index to rebuild."));
                return;
            }

            if (indexingTaskExecutor.DeleteIndex(indexName))
            {
                notifier.Information(T("The index {0} has been rebuilt.", indexName));
                UpdateIndex(indexName);
            }
            else
            {
                notifier.Warning(T("The index {0} could no ben rebuilt. It might already be in use, please try again later.", indexName));
            }
        }