Developer forum

Forum » Ecommerce - Standard features » Suggested search results count

Suggested search results count

Per Ljung
Reply
Hi!

Is there a setting for how many results to display in the dropdown list when you use suggested search?

/Per

Replies

 
Pavel Volgarev
Reply
Hi Per,

The "Suggested queries" functionality displays 5 results by default.

If you need less results, then take a look at the following thread: Relevance in ecom suggested search. The solution that I posted in there can be reused in your situation.

If you need more results, then it's not possible right now but I've added a feature item into our product backlog: #8990, "Make it possible to change the amount of suggested queries".

-- Pavel 
 
Pavel Volgarev
Reply
Hi Per,

This functionality has now been implemented and will be available with the next major release.

You can change the maximum number of query suggestions via paragraph settings ("Max. query suggestions" under the "Advanced search" section). The value must be between 1 and 20 (otherwise the system falls back to default value of 5).

Furthermore, you can change this value from within your JavaScript:
Dynamicweb.Frontend.InstantSearch.setEnableSuggestions('txFreeTextQuery', true, {
    boxID: 'divSuggestions',
    request: { 'MaxSuggestions': '10' }
});
-- Pavel 

 

You must be logged in to post in the forum