I'm now frequently getting a
"Cannot access a closed file. " while performing a search using "any words"
Stack trace is typically:
Message: Cannot access a closed file.
Stack Trace:
at System.IO.FileStream.Seek(Int64 offset, SeekOrigin origin)
at Lucene.Net.Index.SegmentTermDocs.Seek(TermInfo ti)
at Lucene.Net.Index.SegmentTermDocs.Seek(Term term)
at Lucene.Net.Index.MultiTermDocs.TermDocs(Int32 i)
at Lucene.Net.Index.MultiTermDocs.Read(Int32[] docs, Int32[] freqs)
at Lucene.Net.Search.TermScorer.Score(HitCollector c, Int32 end)
at Lucene.Net.Search.TermScorer.Score(HitCollector hc)
at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, HitCollector results)
at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs)
at Lucene.Net.Search.MultiSearcher.Search(Weight weight, Filter filter, Int32 nDocs)
at Lucene.Net.Search.Hits.GetMoreDocs(Int32 min)
at Lucene.Net.Search.Hits.HitDoc(Int32 n)
at Lucene.Net.Search.Hits.Doc(Int32 n)
at CMS.SiteProvider.SearchHelper.FilterResults(Hits results, Boolean checkPermissions, Boolean combineWithDefaultCulture, String culture, String defaultCulture, Int32 maxResults, UserInfo user, Hashtable documents, List`1 inRoles, List`1 notInRoles)
at CMS.SiteProvider.SearchHelper.Search(SearchParameters parameters)
at CMSModules_SmartSearch_SearchIndex_Search.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Rebuilding the index generally solves the issue, but it comes up every other day and the search breaks. For the most part, the search is pretty standard and out the box- a couple of document classes, one site, one culture. ±3500 documents in total, ±7MB index.
There is ample space on the disk and the network service has write access to the Smartsearch folder, it's not also a read-only folder. Any ideas?