示例#1
0
        public void Commit(IState state)
        {
            try
            {
                _indexWriter.Commit(state);
            }
            catch (SystemException e)
            {
                LuceneIndexWriter.TryThrowingBetterException(e, _directory);

                throw;
            }
        }
        public void Optimize(IState state)
        {
            try
            {
                _indexWriter.Optimize(state);
            }
            catch (SystemException e)
            {
                LuceneIndexWriter.TryThrowingBetterException(e, _directory);

                throw;
            }
            finally
            {
                RecreateIndexWriter(state);
            }
        }
        public void Commit(IState state)
        {
            try
            {
                _indexWriter.Commit(state);
            }
            catch (SystemException e)
            {
                LuceneIndexWriter.TryThrowingBetterException(e, _directory);

                throw;
            }
            finally
            {
                _indexSearcher?.Dispose();
                _indexSearcher = null;
            }
        }