Cách sửa lỗi Sitecore SXA Search Box Suggestion Not Found

Khi bạn sử dụng SXA trong và thực hiện tính năng Search Suggestion trong Search box mà gặp lỗi Not Found thì phải làm sau?
Để giải quyết lỗi này, bạn cần thực hiện các bước sau:

Bước 1: Truy cập vào thư mục Solr => server => và core index đang sử dụng để search
Bước 2: Mở thư mục conf và sửa tệp solrconfig.
Bước 3: Thêm các dòng mã sau vào tệp sau đó save và đánh index lại sitecore.

<searchComponent name="suggest" class="






















.SuggestComponent">
 <lst name="suggester"> 
<str name="name">sxaSuggester</str> 
<str name="lookupImpl">BlendedInfixLookupFactory</str> 
<str name="dictionaryImpl">DocumentDictionaryFactory</str> 
<str name="contextField">_language</str> 
<str name="field">suggestionadge_s</str> 
<str name="suggestAnalyzerFieldType">text_suggester</str> 
<str name="payloadField">templatedisplaynameadge_s</str>
 <str name="buildOnStartup">true</str> 
<str name="buildOnCommit">false</str> 
</lst> </searchComponent> 
<requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy" > 
<lst name="defaults"> 
<str name="suggest.dictionary">sxaSuggester</str> 
<str name="suggest">true</str> 
<str name="suggest.onlyMorePopular">true</str> 
<str name="suggest.count">30</str> 
<str name="suggest.collate">true</str> 
</lst>
 <arr name="components"> 
<str>suggest</str> 
</arr>
 </requestHandler>

Như vậy là bạn đã fix được lỗi SXA Search Box Suggestion Not Found rồi, chúc các bạn thành công!

Xem thêm:

https://citizensitecore.com/2021/08/16/search-predictions-and-auto-complete-with-sxa/
https://sitecore.stackexchange.com/questions/19379/sxa-autosuggest-results-sorting

Bình luận Facebook