Gravatar for

Question by jpalbuja, Apr 29, 2019 10:40 PM

Coveo Hive Search Box Suggestions Limit

Hi guys, I have woking my coveo searchbox and also I can see suggestions when I strat typing in the search bar.

Is there a way to limit the number of suggestions? How many suggestions is the default limit?


Gravatar for

Comment by François Lachance-Guillemette, Apr 30, 2019 12:12 PM

Have you tried the numberOfSuggestions option?

1 Reply
Gravatar for

Answer by François Lachance-Guillemette, Apr 30, 2019 5:25 PM

I think you can add the numberOfSuggestions option on your SearchBox component.

Here are two options to add data-attributes not fronted in Coveo for Sitecore Hive:

Passing Non-Fronted JavaScript Framework Properties to Hive Components


You could add a simple JavaScript snippet that adds the option to your component.

For instance:

document.getElementById("YOUR_SEARCH_BOX_ID").dataset.numberOfSuggestions = 5;

This code can be added in the Custom Initialization Scripts or simply by adding a rendering that contains this code in a script tag.

Ask a question