[英]Sitecore search with custom index
我正在嘗試使用Sitecore搜索和自定義索引來過濾和搜索項目。
這些項目是產品評論,並且都存儲在具有ProductReview
模板的單個文件夾中。
+ Reviews
- Sample Review 1
- Sample Review 2
- Sample Review 3
用戶將能夠按類別,子類別過濾項目並按產品名稱進行搜索。 所以表單看起來類似於:
Category: [ Drop Down ]
Sub Category: [ Drop Down ]
Product name: [ Single line of Text ]
[ Search Button ]
我發現定義索引的文檔很薄。 我正在嘗試使用以下屬性設置索引。
我不確定我是否需要自定義分析器或DatabaseCrawler,而我還沒有考慮制作一個。
這是我到目前為止所做的,但是我還沒有制作出工作指數:
<index id="reviews" type="Sitecore.Search.Index, Sitecore.Kernel">
<param desc="name">$(id)</param>
<param desc="folder">reviews</param>
<Analyzer ref="search/analyzer" />
<include hint="list:IncludeField">
<!-- Category -->
<fieldId>Category</fieldId>
<!-- Sub Category -->
<fieldId>Sub Category</fieldId>
<!-- Product Name -->
<fieldId>Product Name</fieldId>
</include>
<locations hint="list:AddCrawler">
<web type="Sitecore.Search.Crawlers.DatabaseCrawler, Sitecore.Kernel">
<Database>web</Database>
<!-- {GUID} -->
<Root>{GUID}</Root>
<Tags>web reviews</Tags>
<IndexAllFields>false</IndexAllFields>
<templates hint="list:AddTemplate">
< !-- Product Review -- >
<reviews>Product Review</reviews>
</templates>
</web>
</locations>
</index>
任何指針都將非常感激。
編輯
我正在尋找的兩件主要事情是:
使用SitecoreSearchContrib (也稱為高級數據庫爬蟲)庫可以使您在索引和搜索方面更加輕松。 該庫包含示例配置,可以讓您更清楚地了解如何進行設置。
一些初始指針,即使您不使用SitecoreSearchContrib:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.