Getting pager to respect MaxPages set on Smart Search Results web part

Tracey Penberthy asked on August 3, 2017 13:07

Hi

I have a Smart Search Results Web part on which I am setting a MaxPages of 100.

The reason being my search index is configured to return a maximum of 1000 results and when there are more results the paging keeps on going but there are no results to display.

I cannot get my paging transformations to respect the max pages settings.

When I inspect the dataset from the pager it still sets the last page ("Last") as 208 (where there are 2078 results) when I would have thought it should be 100.

Any ideas?

Many Thanks Tracey

Correct Answer

Peter Mogilnitski answered on August 3, 2017 17:38

What I usually do is set Search settings/Max. results, for example if you have pager that shows 5 results per page and max pages set to 10 - I set max results to 50.

Image Text

0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on August 4, 2017 06:09 (last edited on August 4, 2017 06:14)

By default Kentico will only return 1000 total results. You need to modify the web.config and add this key.

<add key="CMSSearchMaxResultsNumber" value="2500" />

The pager is different than the results and honestly I think it's a bug but if you set the TopN to 1000 it will fix the issue. Add the key if you want to show all results.

See the documentation.

0 votesVote for this answer Mark as a Correct answer

Tracey Penberthy answered on August 4, 2017 10:09

Thanks Peter setting the MaxResults to 1000 on the results control worked for me - now the pager sets 100 as the last page as expected.

Brenden that's really useful to know should I want to change the default smart search max results.

Thank you both

0 votesVote for this answer Mark as a Correct answer

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