我正在使用sitecore8。 sitecore中的索引工作正常。我得到一个“在此模式下不允许递归读取锁定”。当调试器使用(var context = searchIndex.CreateSearchContext())代码行访问代码时,我的代码文件出错。我使用的是Lucene.Net 3.0.3.0版本
var searchIndex = Sitecore.Search.SearchManager.GetIndex(SearchIndexName);
using (var context = searchIndex.CreateSearchContext())
{
}
STACK TRACE:
at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout)
at System.Threading.ReaderWriterLockSlim.TryEnterReadLock(TimeoutTracker timeout)
at Sitecore.Search.Index.Sitecore.Search.IIndexMutex.EnterOpearionContext()
at Sitecore.Search.IndexContextBase.EnterOperationContext(ILuceneIndex index)
at Sitecore.Search.IndexSearchContext..ctor(ILuceneIndex index)
at Sitecore.Search.Index.CreateSearchContext()
at MyProject.Common.NewSearchManager.Search(String searchString, String ProgramCampusStage, ScoreDoc[]& hitScores) in e:\Source Control\GIT\MyProject-sitecore-mvc\Code\Dependencies\MyProject\Common\NewSearchManager.cs:line 148
at MyProject.Repositories.SearchRepository.Search(String searchTxt, String ProgramCampusStage, String searchCategory, String& message, Int32 offset, Int32 limit, String hostName, String searchIndexName, String currentDatabase, String searchCampus) in e:\Source Control\GIT\MyProject-sitecore-mvc\Code\Dependencies\MyProject\Repositories\SearchRepository.cs:line 36
at MyProject.Controllers.SearchController.GetSearchResult(String userid, String searchTxt, String searchCategory, String offset, String limit, String hostName, String searchCampus) in e:\Source Control\GIT\MyProject-sitecore-mvc\Code\Dependencies\MyProject\Controllers\SearchController.cs:line 267