public void Dispose() { if (_disposed) { return; } Log.Debug("Object disposed"); _indexWrapper.ReleaseSearcher(this); _indexSearcher = null; _indexWrapper = null; _disposed = true; }
internal LuceneIndexSearcherRef(IndexSearcher indexSearcher, LuceneIndexWrapper indexWrapper) { if (indexSearcher == null) { throw new ArgumentNullException(nameof(indexSearcher)); } if (indexWrapper == null) { throw new ArgumentNullException(nameof(indexWrapper)); } _indexSearcher = indexSearcher; _indexWrapper = indexWrapper; Log.Debug("Object constructed"); }
public void InitializeIndex(string indexId) { Log.InfoFormat("Initializing index id {0}", indexId); // Re-register configuration keys in case a client haven't called RegisterConfigurationKeys prior to this method RegisterConfigurationKeys(indexId); lock (IndexesLock) { if (Indexes.ContainsKey(indexId)) { return; } var luceneIndexWrapper = new LuceneIndexWrapper(indexId); Composer.InitializePlugs(luceneIndexWrapper); Indexes[indexId] = luceneIndexWrapper; } }
public static void RegisterConfigurationKeys(string indexId) { LuceneIndexWrapper.RegisterConfigurationKeys(indexId); }