Predictive search on smart search box is really slow

Tracey Penberthy asked on April 25, 2017 14:05

Hi

I have enabled predictive search on a smart search box. The results drop down takes ages (20+ seconds) to appear.

I have tried

  • Changing the index to something smaller ( a custom table index)
  • Simplifying the results transformation
  • Switching debug mode off
  • Switching predictive tracking options off

None of these make any difference

The results get returned straight away when I use the search preview (Smart Search > [index] > Search Preview)

Does anyone have any suggestions as to why the predictive results are taking so long to appear.

Many Thanks Tracey

Recent Answers


Rui Wang answered on April 25, 2017 16:29

Hi Tracy

First, you have to type at least 3 letters for PS to start the search process.

Second, how large is you search index? If you go to the smart search app, look into the index, you should see how many items are in there.

Also, predictive search may not be a good thing for a large index with a lot of items. Because you are essentially doing a search without getting to the search result page. Try to create a test page with the search result with dialog box web part, use the same index. See what the performance of that is. If that is also slow, then it maybe the overall search performance on your site, not just PS.

0 votesVote for this answer Mark as a Correct answer

Tracey Penberthy answered on April 25, 2017 16:48

Thanks Rui

Search index size

Indexed items: 446 Index file size: 2.4 MB

(Is this too big for PS?)

I have created a test page with the same index as you suggested and the results appear pretty much straight away.

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on April 25, 2017 16:55

That is little bit much for PS. PS should be a smaller collection of content that you want people to hit. For example, you have a website with 100 product/service pages, and 100 other pages. Then PS maybe more suitable for just the product/service pages compare to other pages. So you should create a smaller index just for those pages for PS.

If you want to have another site wide search, create another index for other pages, and use both indexes for the site wide search.

0 votesVote for this answer Mark as a Correct answer

Tracey Penberthy answered on April 25, 2017 17:05

Thanks Rui

I really appreciate your help with this

Out of curiosity are you able to explain why PS can only handle a certain size index?

Would we be able to circumvent this issue by implementing our own predictive search box?

Many Thanks Tracey

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on April 25, 2017 17:19 (last edited on April 25, 2017 17:23)

I would not say it can only handle certain size, but have good performance for certain size. Because the search is updated with every key strike versus a single search button click on regular search.

One way I can think of to help the performance is you can configure it to be maybe PS only starts after you enter minimum of 5 characters. This way, you will have fewer search update compare to default.

0 votesVote for this answer Mark as a Correct answer

Chris Percival answered on April 27, 2017 18:24

I have noticed this issue too.

Rui I think you're incorrect about the search being updated every time you hit a key. Its not, its only sent once when you stop typing. I also think you're incorrect about the index size. If the standard search is instantaneous, even with this size index, why does predictive search take so long to come back with results?

One theory could be that the predictive search ajax posts back to the page url it's self. I don't know how this works, but could the page be doing stuff in the background it doesn't need to do in this case?

0 votesVote for this answer Mark as a Correct answer

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