最终通过摆脱第二个索引解决了这个问题,而是简单地在 中包含一个附加<locations>...</locations>
块,scSearchContrib.Crawler.config
指向我的文档所在的媒体库中的文件夹。
例如
代替App_Config/Include/scSearchContrib.Crawler.config
......
<index id="web" type="Sitecore.Search.Index, Sitecore.Kernel">
<param desc="name">$(id)</param>
<param desc="folder">web</param>
<Analyzer ref="search/analyzer" />
<locations hint="list:AddCrawler">
<my-site-content type="scSearchContrib.Crawler.Crawlers.AdvancedDatabaseCrawler,scSearchContrib.Crawler">
<Database>web</Database>
<Root>/sitecore/content/MySite/Home</Root>
<tags>Web Content</tags>
<IndexAllFields>true</IndexAllFields>
<!-- Include/Exclude templates, crawlers etc here -->
</locations>
<locations hint="list:AddCrawler">
<my-site-media-library type="scSearchContrib.Crawler.Crawlers.AdvancedDatabaseCrawler,scSearchContrib.Crawler">
<Database>web</Database>
<Root>/sitecore/media library/SomeFolder/Documents</Root>
<tags>Documents</tags>
<IndexAllFields>true</IndexAllFields>
<!-- Include/Exclude templates, crawlers etc here -->
</locations>
</index>
......