Beispiel #1
0
        private void _textIndexProcessor_ThreadFinished(object sender, EventArgs e)
        {
            Trace.WriteLine("--TextIndexManager -- [Thread finished] event has been fired.");

            //  Build the first chunck if there is no index yet, otherwise it
            //  will be rebuilt once more.
            if (!IsIndexPresent())
            {
                EndBatchUpdate();
            }
            Trace.WriteLine("--TextIndexManager -- Flush indices has started.");
            _textIndexer.CloseIndices();
            Word.DisposeTermTrie();
            Trace.WriteLine("--TextIndexManager -- Flush indices has finished.");
        }
Beispiel #2
0
        [TearDown] public void TearDown()
        {
            CloseStorage();
            indexer.CloseIndices();
            indexer.DiscardTextIndexImpl(false);
            Word.DisposeTermTrie();

            try
            {
                string[] files = Directory.GetFiles(".", "_*");
                foreach (string fileName in files)
                {
                    File.Delete(fileName);
                }
            }
            catch (Exception exc)
            {
                Console.WriteLine(exc.Message);
                Assert.Fail(exc.Message);
            }
        }