开发者

Lucene.NET ObjectDisposedException when searching

I have an application that uses Lucene.Net for searching.

There is a windows service that builds the index, and a ASP.NET application then creates an IndexSearcher to search the index.

Now I am constantly getting the following stack trace/error when attempting to do a search. I can't debug it because it is deployed on production.

System.ObjectDisposedException: Cannot access a closed file.
 at System.IO.__Error.FileNotOpen()
 at System.IO.FileStream.Seek(Int64 offset, SeekOrigin origin)
 at Lucene.Net.Store.SimpleFSDirectory.SimpleFSIndexInput.ReadInternal(Byte[] b, Int32 offset, Int32 len)
 at Lucene.Net.Store.BufferedIndexInput.ReadBytes(Byte[] b, Int32 offset, Int32 len, Boolean useBuffer)
 at Lucene.Net.Index.CompoundFileReader.CSIndexInput.ReadInternal(Byte[] b, Int32 offset, Int32 len)
 at Lucene.Net.Store.BufferedIndexInput.Refill()
 at Lucene.Net.Store.BufferedIndexInput.ReadByte()
 at Lucene.Net.Store.IndexInput.ReadVInt()
 at Lucene.Net.Index.TermBuffer.Read(IndexInput input, FieldInfos fieldInfos) 
 at Lucene.Net.Index.SegmentTermEnum.Next()
 at Lucene.Net.Index.SegmentTermEnum.ScanTo(Term term) 
 at Lucene.Net.Index.TermInfosReader.Get(Term term, Boolean useCache) 
 at Lucene.Net.Index.TermInfosReader.Terms(Term term) 
 at Lucene.Net.Index.SegmentReader.Terms(Term t) 
 at Luce开发者_Go百科ne.Net.Index.DirectoryReader.MultiTermEnum..ctor(IndexReader topReader, IndexReader[] readers, Int32[] starts, Term t) 
 at Lucene.Net.Index.DirectoryReader.Terms(Term term) 
 at Lucene.Net.Search.WildcardTermEnum..ctor(IndexReader reader, Term term) 
 at Lucene.Net.Search.WildcardQuery.GetEnum(IndexReader reader) 
 at Lucene.Net.Search.MultiTermQuery.ConstantScoreAutoRewrite.Rewrite(IndexReader reader, MultiTermQuery query) 
 at Lucene.Net.Search.MultiTermQuery.Rewrite(IndexReader reader) 
 at Lucene.Net.Search.WildcardQuery.Rewrite(IndexReader reader) 
 at Lucene.Net.Search.BooleanQuery.Rewrite(IndexReader reader) 
 at Lucene.Net.Search.IndexSearcher.Rewrite(Query original) 
 at Lucene.Net.Search.Query.Weight(Searcher searcher) 
 at Lucene.Net.Search.Searcher.CreateWeight(Query query) 
 at Lucene.Net.Search.Searcher.Search(Query query, Filter filter, Int32 n, Sort sort)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜