gpt4 book ai didi

lucene - Umbraco V6.1.3 Lucene 索引损坏

转载 作者:行者123 更新时间:2023-12-02 02:49:59 25 4
gpt4 key购买 nike

刚刚将 Umbraco V6.1.1 站点升级到 V6.1.3。我的工作站上一切顺利。删除所有文件后,将文件复制到网络服务器,对数据库执行相同的操作。设置所有目录权限并运行该站点。站点(MVC)运行但有两个我无法理解的问题,并且非常感谢一些帮助。

一页错误并伴有 Read Past EOF 错误。这是它试图运行的 View 。错误位于粗体链接上。

@inherits Umbraco.Web.Mvc.UmbracoTemplatePage

@{
Layout = "BasePage.cshtml";
}
<div class="row-fluid">
<div class="span12">
<h1>@Umbraco.Field("pageName")</h1>
@Umbraco.Field("pageText")
</div>
</div>
<div class="row-fluid">
<div class="span12">
@foreach (var page in Model.Content.Children) {
<section class="well">
<h3>@page.Name</h3>
@if(page.Children.Count() > 0) {
<ul>
**@foreach (var pub in page.Children) {**
<li><a href="@Umbraco.Media(pub.GetPropertyValue("publication")).Url" title="@pub.Name" target="_blank">@pub.Name</a></li>
}
</ul>
}
</section>
}
</div>
</div>

堆栈跟踪是

[IOException: read past EOF]
Lucene.Net.Index.FindSegmentsFile.Run(IndexCommit commit) +2040
Lucene.Net.Index.DirectoryReader.Open(Directory directory, IndexDeletionPolicy deletionPolicy, IndexCommit commit, Boolean readOnly, Int32 termInfosIndexDivisor) +57
Lucene.Net.Search.IndexSearcher..ctor(Directory path, Boolean readOnly) +29
Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(Boolean forceReopen) +136

另一个(我认为相关的问题)是在 CMS 中,当打开开发人员部分时,我收到一个 javascript 警报,其中包含与 Lucene 相关的巨大错误消息

error: {"Message":"An error has occurred.","ExceptionMessage":"The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8'.","ExceptionType":"System.InvalidOperationException","StackTrace":null,"InnerException":{"Message":"An error has occurred.","ExceptionMessage":"Could not create an index searcher with the supplied lucene directory","ExceptionType":"System.ApplicationException","StackTrace":"   at Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(Boolean forceReopen)\r\n   at Examine.LuceneEngine.Providers.LuceneSearcher.GetSearcher()\r\n   at Umbraco.Web.Search.ExamineExtensions.GetIndexReaderForSearcher(BaseLuceneSearcher searcher)\r\n   at Umbraco.Web.Search.ExamineExtensions.GetIndexDocumentCount(LuceneIndexer indexer)\r\n   at Umbraco.Web.WebServices.ExamineManagementApiController.CreateModel(BaseIndexProvider indexer)\r\n   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n   at Newtonsoft.Json.Serialization.JsonArrayContract.CreateWrapper(Object list)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value)\r\n   at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value)\r\n   at System.Net.Http.Formatting.JsonMediaTypeFormatter.<>c__DisplayClassd.<WriteToStreamAsync>b__c()\r\n   at System.Threading.Tasks.TaskHelpers.RunSynchronously(Action action, CancellationToken token)","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"read past EOF","ExceptionType":"System.IO.IOException","StackTrace":"   at Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommit commit)\r\n   at Lucene.Net.Index.DirectoryReader.Open(Directory directory, IndexDeletionPolicy deletionPolicy, IndexCommit commit, Boolean readOnly, Int32 termInfosIndexDivisor)\r\n   at Lucene.Net.Search.IndexSearcher..ctor(Directory path, Boolean readOnly)\r\n   at Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(Boolean forceReopen)"}}}

尝试过 Umbraco 论坛但没有回复。如果这是理所当然的,我当然还是需要知道。

如有任何建议,我们将不胜感激。

最佳答案

我会备份索引(它们位于 app_data\temp\....),然后删除它们并重新启动应用程序池。

Umbraco 将在下次启动时重建它们(对于一个巨大的数据库 - 150k 节点可能需要 5-10 分钟)。

这可能是一个损坏的索引(在这种情况下,获取备份并对其使用 Luke,看看它是否已损坏),或者可能是索引的版本发生了更改 - 这是相同的结果。

https://code.google.com/p/luke/

关于lucene - Umbraco V6.1.3 Lucene 索引损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18110298/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com