我有兩個智能搜索索引作爲實驗。一種是「頁面」,另一種是「尋呼機爬行器」。Kentico智能搜索結果有意想不到的內容輸出
我的網頁有一個部分,使用中繼器,這是一個自定義頁面類型。它呈現出這樣的:
<div class="fullWrap pageBanner">
<div class="container pageHeading">
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="pageHeading--headingCopy">
<h1>This is the Home Page. Buy some RESPs.</h1>
<h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus volutpat posuere posuere.</h2>
<a href="/Learn-About-RESPs.aspx" class="btn btn-chevron">Learn More</a>
</div>
</div>
<div class="col-xs-12 col-md-6">
<div class="pageHeading--heroImage">
<img src="/kffCorporate/media/KFFCorporate/headerImages/0-0_KFF_Home_Image-555px-gradient.jpg?ext=.jpg" class="img-responsive" alt="This is the Home Page. Buy some RESPs.">
</div>
</div>
</div>
</div>
</div>
沒什麼特別的,只是一個基本的引導流體容器,有兩列。
我的搜索結果,不要從'pageHeading - headingCopy'中找到任何副本,但是我確實得到了圖片的url。
這是搜索轉換的輸出。
註冊教育儲蓄計劃〜/ kffCorporate /媒體/ KFFCorporate/headerImages /家庭benefits.jpg CTA標題Lorem存有悲坐阿梅德,consectetur adipiscing ELIT。 Duis luctus vehi ...
這裏是轉化的相關部分。
<%-- Search result content --%>
<div class="content">
<%#SearchHighlight(HTMLHelper.HTMLEncode(TextHelper.LimitLength(HttpUtility.HtmlDecode(HTMLHelper.StripTags(CMS.ExtendedControls.ControlsHelper.RemoveDynamicControls(GetSearchedContent(DataHelper.GetNotEmpty(Eval("Content"), ""))), false, " ")), 200, "...")), "<span class='searchTerm'>", "</span>")%>
</div>
我覺得轉型會拿起一個什麼樣的呈現在頁面上的第200個字符,但它缺少的H1和H2,以及具有其他物品。如果我在H1或H2中搜索副本,則返回結果中的頁面,但搜索結果中顯示的內容已關閉。
有什麼想法?
謝謝。我做到了。對於CMS.MenuItem,我將內容切換到DocumentPageDescription。我們正在使用它來搜索引擎優化,所以它也適用於此。 謝謝! –