コード例 #1
0
        public void Dispose()
        {
            // Spellchecker first, because it uses _index
            Spellchecker.Dispose();
            State?.Dispose();

            Disposed?.Invoke();
        }
コード例 #2
0
        public void LoadIndexes()
        {
            var newState = CreateState();

            LoadIndex(newState);

            if (newState.IsLoaded)
            {
                Spellchecker.LoadIndex(newState);
            }
        }
コード例 #3
0
        protected LuceneSpellcheckerState(
            Spellchecker spellchecker,
            LuceneSearcherState <TId, TDoc> searcherState,
            IDocumentAdapter <TId, TDoc> adapter,
            Func <int> maxCount,
            bool loaded)
        {
            _spellchecker = spellchecker;
            _reader       = searcherState.Reader;
            _adapter      = adapter;
            _maxCount     = maxCount;

            IsLoaded = loaded;
        }
コード例 #4
0
 protected abstract LuceneSpellcheckerState <TId, TDoc> CreateState(LuceneSearcherState <TId, TDoc> searcherState, Spellchecker spellchecker, bool loaded);