Raise result limit & make it configurable #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR changes the search to return as many results as possible instead of the default 10. It also exposes this as a configurable setting.
Other Information
The MediaWiki default is to return 10 results per search, which means many results may be omitted if searching for a common keyword.
We've used a patch that raises the limit to 50 (arbitrarily), but looking at the API docs I found that you can pass
max
as the limit to return all results (500 seems to be the actual maximum).We've used these changes for a while now, and have not had any issues. The results page accommodates even long lists of results very well.
I didn't add any tests as there weren't any existing ones for the search params, but I'm open to suggestions. :)
Copyright assignment
I agree to the Contributor's Agreement and assign all rights, including copyright, to these Contributions to Security Roots.