예제 #1
0
        public override ConversationResponse Respond(LuisResult result, ItemContextParameters parameters, IConversation conversation)
        {
            var message = "";
            var index   = (string)conversation.Data[IndexKey];

            if (index == AllOption)
            {
                IndexCustodian.RebuildAll(new [] { IndexGroup.Experience });
                message = Translator.Text("Chat.Intents.RebuildIndex.AllRebuiltMessage");
            }
            else
            {
                var searchIndex = ContentSearchWrapper.GetIndex(index);
                IndexCustodian.FullRebuild(searchIndex);
                message = string.Format(Translator.Text("Chat.Intents.RebuildIndex.RebuildIndexMessage"), index);
            }

            return(ConversationResponseFactory.Create(message));
        }
        public override ConversationResponse Respond(LuisResult result, ItemContextParameters parameters, IConversation conversation)
        {
            var message = "";
            var index   = (string)conversation.Data[IndexKey];

            if (index == "All")
            {
                IndexCustodian.RebuildAll(new [] { IndexGroup.Experience });
                message = "All indexes are being rebuilt";
            }
            else
            {
                var searchIndex = ContentSearchWrapper.GetIndex(index);
                IndexCustodian.FullRebuild(searchIndex);
                message = $"The {index} index is being rebuilt";
            }

            return(ConversationResponseFactory.Create(message));
        }
예제 #3
0
        private void RebuildInxdexes([NotNull] string databaseName)
        {
            Debug.ArgumentNotNull(databaseName, nameof(databaseName));

            IndexCustodian.RebuildAll();
        }