<IndexSet SetName="ProductsIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/Products/" > <IndexAttributeFields> <add Name="id" /> <add Name="nodeName"/> <add Name="productName"/> <add Name="nodeTypeAlias" /> </IndexAttributeFields> <IncludeNodeTypes> <add Name="homeProduct"/> <add Name="product"/> </IncludeNodeTypes> </IndexSet>
<add name="ProductIndexer" type="UmbracoExamine.UmbracoMemberIndexer, UmbracoExamine" supportUnpublished="true" supportProtected="true" analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" indexSet="ProductsIndexSet"/>
<add name="ProductSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine" supportUnpublished="false" supportProtected="true" indexSet="ProductsIndexSet" analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
但是当从Developer-Examine Management- ProductIndexer运行Rebuild Index时,我在Index中得到0个文档。
我真的不确定如何继续检查嵌套的内容。任何人都可以帮我设置嵌套内容的检查搜索索引吗?
如果您的主节点别名是“home”,则需要将其添加到Index配置中的Included Node Types。 product
不需要包括在内,除非它本身也是一个内容节点。
您可能还想看看这里的文章,其中概述了索引嵌套内容的方法等。
https://youritteam.com.au/blog/indexing-content-in-complex-umbraco-data-types