Example #1
0
        private static async Task CreateAndBuildDtSearch()
        {
            Console2.WriteStartHeader("Create Search");
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();

            // Create Keyword Search
            int seedSearchId = await RESTSearchHelper.CreateKeywordSearchAsync(_httpClient, _workspaceArtifactId);

            // Create dtSearch Index
            _dtSearchIndexId = await RESTSearchHelper.CreateDtSearchIndexAsync(_httpClient, _workspaceArtifactId, seedSearchId);

            // Build dtSearch Index
            await RESTSearchHelper.BuildDtSearchIndexAsync(_httpClient, _workspaceArtifactId, _dtSearchIndexId);

            // Create dtSearch
            _dtSearchArtifactId = await RESTSearchHelper.CreateDtSearchAsync(_httpClient, _workspaceArtifactId, _dtSearchIndexId, Constants.Workspace.EXTRACTED_TEXT_FIELD_NAME);

            stopwatch.Stop();
            DisplayTimeElapsed(stopwatch.Elapsed);
        }