public void Dispose() { // Spellchecker first, because it uses _index Spellchecker.Dispose(); State?.Dispose(); Disposed?.Invoke(); }
public void LoadIndexes() { var newState = CreateState(); LoadIndex(newState); if (newState.IsLoaded) { Spellchecker.LoadIndex(newState); } }
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; }
protected abstract LuceneSpellcheckerState <TId, TDoc> CreateState(LuceneSearcherState <TId, TDoc> searcherState, Spellchecker spellchecker, bool loaded);