Getting Predictive Search working on Kentico 10

Derek McDonald asked on October 10, 2017 05:28

Hi,

I'm trying to get predictive search working for our company website and not having much luck. We are using Kentico 10 which is using a site that has been upgraded from Kentico 9.

We have a smart search box web part on the master template of the site and that is working fine. I have ticked the "Enable predictive search" checkbox and selected an index, which I have created a new index for the predictive search. Search preview works fine for that index. All other predictive search settings in the smart search box web part I have left as defaults.

I enter in a search term into the search text box on the live site and it does not appear to do anything.

All help is appreciated.

Correct Answer

Matt Nield answered on October 10, 2017 10:37

Hi Derek, I just ran through the steps defined in the documentation for setting up a predicative search on Kentico 10 and initially thought I was not getting any results. I added a value in Predictive results > No results content and that showed up immediately. After a few seconds (wow) I got some results back from the search.

I then had an explore to see what the browser thogh it was doing using the Chrome developer tools. Three things are useful here:

  1. In the Element tab, look for a div with a class of predictiveSearchHolder. This will be in the same container as the Smart search box web part. Ensure that your CSS does not interfere with this and that it is visible on page.
  2. Switch to the Network tab and limit the type to XHR. As you type in the search box, you should see traffic flowing int he network tab.
  3. Ensure that there are no errors in the Console tab from client scripting that might prevent the predictive search from triggering.

If neither of the above have positive results, could oyu try creating a new Smart search text on a blank page/template to see if that basics are working.

2 votesVote for this answer Unmark Correct answer

Recent Answers


David te Kloese answered on October 10, 2017 10:29

Derek McDonald answered on October 12, 2017 02:05

Thanks for your help.

Found that there was an additional search box on the template that was being hidden by CSS in the design view in Kentico admin and that was the one showing up on the website. A few adjustments to some styles and the configuration on the correct web part has resolved the problem.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.