0

I am using Sitecore 9.0.1 with SXA 1.7 and Solr 6.6.2. I have added a search box component and search result component on the same page for a chinese language and also selected the ShowPrdeictions option for the search box but it is not working . enter image description here

Here is the output of my page. When i search for some text it is not showing any suggestions

enter image description here

Can anyone please suggest if i am missing anything

Thanks

3
  • Do you see any requests firing when you type in the searchbox? What is the output of those requests? Anything in your logs? ... – Gatogordo Apr 27 at 11:45
  • On type there is no request found but when i hit submit it is giving results related to title @Gatogordo – Vinaya Apr 27 at 12:00
  • @Gatogordo if i change suggestion mode to ShowSearchResults as Prediction it works fine..means it is giving the suggestions based on the title field – Vinaya Apr 27 at 12:52
0

As you can read on https://doc.sitecore.com/users/sxa/18/sitecore-experience-accelerator/en/walkthrough--adding-search-functionality-to-your-page.html the options for the suggestion mode are:

  • Show search results: shows the search results, rendered by rendering variants. User will be redirected to the clicked item.
  • Show predictions: shows search phrase predictions provided by the search engine. This mode is supported for Solr only.
  • Show search results as predictions: clicked text will be put in the search box and search is performed.

SXA uses a suggester called sxaSuggester. If you set up search suggestions in Solr, make sure to use that name.

So in order to get the predictions working as you requested, you need to setup your solr to handle the suggestions. You can find some blogs on how to do that - one example is https://tamermblog.wordpress.com/2018/02/20/setting-up-sxa-search-box-with-suggest/.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.