使用Lucene和Sitecore获取锁失败
我正在尝试在 Sitecore 中实现 Lucene 搜索。使用默认的 Sitecore.Search 实现,我应该能够获取对配置文件中定义的索引的引用并调用 index.Rebuild。
我尝试使用 AdvancedDatabaseCrawler 中的 RebuildDatabaseCrawlers 脚本,但每次我调用 Rebuild 时,它都会失败。
我收到的错误是:
Lock obtain timed out: SimpleFSLock@C:\sites\MySite\Data\indexes\__mysite\write.lock
我尝试更改权限(包括给予每个人完全权限)、重新启动数据库和 IIS,但均无济于事。我还尝试将搜索配置部分精简到最低限度,但结果相同。
不幸的是,我对 index.Rebuild() 方法的作用没有任何了解,因为它位于 Sitecore.Search 程序集中。
I'm trying to implement Lucene search in Sitecore. Using the default Sitecore.Search implementation, I should be able to get a reference to the index defined in my config file and call index.Rebuild.
I tried using the RebuildDatabaseCrawlers script from the AdvancedDatabaseCrawler, but everytime I call Rebuild, it fails.
The error I receive is:
Lock obtain timed out: SimpleFSLock@C:\sites\MySite\Data\indexes\__mysite\write.lock
I've tried changing permissions (including giving Everyone full perms), restarting databases and IIS, all to no avail. I've also tried stripping my search configuration section down to the bare minimum, with the same result.
Unfortunately I don't have any visibility into what the index.Rebuild() method does, as its inside the Sitecore.Search assembly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该问题最终与配置有关。
具体来说,当确定我不需要 Sitecore.Search 和 Sitecore.Data.Indexing 后尝试从配置文件中删除所有多余的 Sitecore.Data.Indexing 引用时,我注释掉了以下行:
需要在那里。
The issue ended up being related to configuration.
Specifically, when trying to remove all superfluous Sitecore.Data.Indexing references from the configuration files after determining that i didn't need both Sitecore.Search and Sitecore.Data.Indexing, I had commented out the following line:
That needs to be there.
尝试为您的应用程序池用户调整
c:\Temp
的权限,例如Network Service
您也可以尝试对:
c:\windows 执行相同的操作\microsoft.net\framework\{版本}\临时 ASP.NET 文件
Try to adjust the permissions for
c:\Temp
for your app pool user, e.g.Network Service
You can also try to do the same for:
c:\windows\microsoft.net\framework\{version}\Temporary ASP.NET Files