Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MaximumPageSize const property for limit page size #6034

Merged
merged 4 commits into from
May 21, 2024

Conversation

Mostafa-Moafi
Copy link
Contributor

Add MaximumPageSize const property for limit page size
Fixes #6033

@@ -37,6 +37,7 @@ public class SearchServiceController : DnnApiController
private const string ModuleTitleCacheKey = "SearchModuleTabTitle_{0}";
private const CacheItemPriority ModuleTitleCachePriority = CacheItemPriority.Normal;
private const int ModuleTitleCacheTimeOut = 20;
private const int MaximumPageSize = 100;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100 seems a little small to me for an absolute limit. If we made this configurable via a host setting, I'm fine with 100 as a default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you but when the user searches in DNN, shows a maximum of 100 results per page.

image

@valadas
Copy link
Contributor

valadas commented May 14, 2024

Just to be sure this maximum is only per page right, one could still obtain more results but on other pages correct?

@Mostafa-Moafi
Copy link
Contributor Author

@valadas yes, of course. I just set the maximum page size per page.

@valadas
Copy link
Contributor

valadas commented May 15, 2024

Ok, I am not too concerned with this but like Brian said, it would be nicer if that value comes from the web.config or a host setting and could be changed without having to recompile. I could see potential implementations where that API gets called from 3rd party modules that may need more results and not support paging (would only get page 1).

@Mostafa-Moafi
Copy link
Contributor Author

@bdukes @valadas OK, I add a new input to the search section in the persona bar. do you agree?

@valadas
Copy link
Contributor

valadas commented May 15, 2024

Sounds like a decent place to put that yes.

@Mostafa-Moafi
Copy link
Contributor Author

@valadas Thanks.
I added a new field in the search section.

@Mostafa-Moafi Mostafa-Moafi requested a review from bdukes May 18, 2024 08:55
@bdukes bdukes added this to the 9.14.0 milestone May 20, 2024
Copy link
Contributor

@valadas valadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@valadas valadas merged commit 1e04695 into dnnsoftware:develop May 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Add Limits for search result
3 participants