Я настроил проверку индексации в umbraco 7, он индексирует некоторые страницы, но не все, например, у меня есть две страницы одного типа документов, один из которых - индекс в поиске, но часть текстового содержимого выше изображения в богатом текстовый редактор и ниже, что содержимое изображения также не является индексом? Невозможно понять ошибку, вот мой Исследовать конфигурацииUmbraco Изучение индексации поиска
ExamineIndex.config:
<ExamineLuceneIndexSets>
<!-- The internal index set used by Umbraco back-office - DO NOT REMOVE -->
<IndexSet SetName="InternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/Internal/"/>
<!-- The internal index set used by Umbraco back-office for indexing members - DO NOT REMOVE -->
<IndexSet SetName="InternalMemberIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/InternalMember/">
<IndexAttributeFields>
<add Name="id" />
<add Name="nodeName"/>
<add Name="updateDate" />
<add Name="writerName" />
<add Name="loginName" />
<add Name="email" />
<add Name="nodeTypeAlias" />
</IndexAttributeFields>
</IndexSet>
<!-- Default Indexset for external searches, this indexes all fields on all types of nodes-->
<IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />
<IndexSet SetName="MySearch" IndexPath="~/App_Data/ExamineIndexes/MySearch/">
<IndexAttributeFields>
<add Name="id" />
<add Name="nodeName"/>
<add Name="updateDate" />
<add Name="writerName" />
<add Name="nodeTypeAlias" />
</IndexAttributeFields>
<IndexUserFields>
<add Name="pageBodyText"/>
<add Name="bodyText"/>
<add Name="title"/>
<add Name="summary"/>
<add Name="projectTitle"/>
<add Name="projectDescription"/>
<add Name="rightBoxContent"/>
<add Name="leftBoxContent"/>
<!--<add Name="siteName"/>-->
</IndexUserFields>
<IncludeNodeTypes>
<!--<add Name="umbHomePage" />-->
<add Name="umbHomePage" />
<add Name="Page" />
<add Name="NewsItem" />
<add Name="Project" />
<add Name="Service" />
<add Name="Client" />
<!--<add Name="PageWithPlugin" />-->
<!--NewsItem,Project,Service,Page,umbHomePage,Client-->
</IncludeNodeTypes>
</IndexSet>
<!--<IndexSet SetName="MySearchIndexer" IndexPath="~/App_Data/TEMP/ExamineIndexes/MySearchIndexer/" />-->
</ExamineLuceneIndexSets>
ExamineSettings.config:
<Examine>
<ExamineIndexProviders>
<providers>
<add name="InternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
supportUnpublished="true"
supportProtected="true"
analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
<add name="InternalMemberIndexer" type="UmbracoExamine.UmbracoMemberIndexer, UmbracoExamine"
supportUnpublished="true"
supportProtected="true"
analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>
<!-- default external indexer, which excludes protected and unpublished pages-->
<add name="ExternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"/>
<add name="MySearchIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
supportUnpublished="false"
supportProtected="true"
interval="10"
analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"
indexSet="MySearch"/>
<!--<add name="MySearchSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" indexSet="MySearch" enableLeadingWildcards="true"/>-->
</providers>
</ExamineIndexProviders>
<ExamineSearchProviders defaultProvider="ExternalSearcher">
<providers>
<add name="InternalSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
<add name="ExternalSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine" />
<add name="InternalMemberSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" enableLeadingWildcard="true"/>
<add name="MySearchSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" indexSet="MySearch" enableLeadingWildcards="true" />
</providers>
</ExamineSearchProviders>
</Examine>
Код макроса:
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@using Examine.LuceneEngine.SearchCriteria
@{
if (!string.IsNullOrEmpty(Request.QueryString["search"]))
{
var q = Request.QueryString["search"];
var Searcher = Examine.ExamineManager.Instance.SearchProviderCollection["MySearchSearcher"];
var searchResults = Searcher.Search(q, true).OrderByDescending(x => x.Score).TakeWhile(x => x.Score > 0.05f);
bool isRecordFound = false;
<ul>
@foreach (var item in searchResults)
{
IPublishedContent node = Umbraco.Content(item.Fields["id"]);
<li>
<a href="@node.Url">
@node.Name
</a>
</li>
isRecordFound = true;
}
</ul>
if (!isRecordFound)
{
<div>
<h1>No Record Found</h1>
</div>
}
}
}