text: public virtual long Record(IndexSearcher searcher){EnsureOpen();var version = ((DirectoryReader)searcher.IndexReader).Version;var factoryMethodCalled = false;var tracker = _searchers.GetOrAdd(version, l => new Lazy<SearcherTracker>(() => { factoryMethodCalled = true; return new SearcherTracker(searcher); })).Value;if (!factoryMethodCalled && tracker.Searcher != searcher){throw new ArgumentException("the provided searcher has the same underlying reader version yet the searcher instance differs from before (new=" + searcher + " vs old=" + tracker.Searcher);}return version;}