Esempio n. 1
0
        // FIXME: Move these to LuceneCommon if and when we decide to
        // support adding/removing arbitrary backends at runtime
        internal void Close()
        {
            Log.Debug("Removing static queryable {0}", IndexName);
            if (text_cache != null)
            {
                text_cache.Dispose();
            }

            // Free the cached IndexReaders
            LuceneCommon.CloseReader(LuceneCommon.GetReader(Driver.PrimaryStore));
            LuceneCommon.CloseReader(LuceneCommon.GetReader(Driver.SecondaryStore));

            Driver.PrimaryStore.Close();
            Driver.SecondaryStore.Close();
            FileAttributesStore.Dispose();
        }