Fixed New posts max results not configurable

What do you have set for Options > Search Options > Maximum Number of Search Results?
20 per page, 200 max search results.

How far can I go up, we need to be able to search back to the beginning.

Staff needs to research repeat problem members, how many times someone violated guidelines, etc.

Members need it for search for help in our how to archives.
 
Last edited:
Does this restriction apply to searches into archives for threads/posts from years ago with the enhanced search as well or just for pages of "New Posts"?
 
Also, I've applied the change, but still only can go back 10 pages.

Is there a cache that needs to clear or something reset, for the new setting to go into effect?
 
Does this restriction apply to searches into archives for threads/posts from years ago with the enhanced search as well or just for pages of "New Posts"?

I believe it applies site wide. Mind you that a user is not going to get tens of thousands of results while searching for specific keywords.

Also, I've applied the change, but still only can go back 10 pages.

Is there a cache that needs to clear or something reset, for the new setting to go into effect?

Not sure, you might have to rebuild the search cache, Tools -> Rebuild Caches -> Rebuild Search Index
 
For new posts, it seems we have a hard coded limit of 200:
PHP:
$maxResults = 200; // TODO: customizable
...and a note that suggests we intended to make it customisable.

I think in XF1 it was customisable based on the maximumSearchResults option so we should either bring that back or make it customisable as it seems we intended.

For now, if you wanted to change it, you'd have to edit the code.

The above code is in the following file: src/XF/ControllerPlugin/FindNew.php and it'd just be a case of changing that value to the desired amount.

Or, if you wanted to base it on the actual max search results option (which I'm tempted to do for the next release) then you'd change it to:
PHP:
$maxResults = $this->options->maximumSearchResults;

I'm going to move this to bugs so we can consider changing it for the next release.
 
For new posts, it seems we have a hard coded limit of 200:
PHP:
$maxResults = 200; // TODO: customizable
...and a note that suggests we intended to make it customisable.

I think in XF1 it was customisable based on the maximumSearchResults option so we should either bring that back or make it customisable as it seems we intended.

For now, if you wanted to change it, you'd have to edit the code.

The above code is in the following file: src/XF/ControllerPlugin/FindNew.php and it'd just be a case of changing that value to the desired amount.

Or, if you wanted to base it on the actual max search results option (which I'm tempted to do for the next release) then you'd change it to:
PHP:
$maxResults = $this->options->maximumSearchResults;

I'm going to move this to bugs so we can consider changing it for the next release.
Thank you very much Chris, I'll get with Russ to make the change.

Meanwhile, I still have one unresolved question, unless I missed it somewhere.

Does this restriction apply to searches into archives for threads/posts from years ago with the enhanced search as well or just for pages of "New Posts"?
 
The maximum number of search results returned will be whatever the value of that option is, which defaults to 200 but you can increase it to pretty much whatever you need.

This doesn't affect the content that is searched - every single piece of content you have will be searched - but only the first X results will be returned. This is mostly a performance thing, but on a server like yours I'm sure increasing it shouldn't be too much of an issue.

Enhanced Search will return the results ordered by relevance, by default, rather than by date so it's even more true in that case that the oldest results won't be hidden, as long as they're relevant to the search.
 
For new posts, it seems we have a hard coded limit of 200:
PHP:
$maxResults = 200; // TODO: customizable
...and a note that suggests we intended to make it customisable.

I think in XF1 it was customisable based on the maximumSearchResults option so we should either bring that back or make it customisable as it seems we intended.

For now, if you wanted to change it, you'd have to edit the code.

The above code is in the following file: src/XF/ControllerPlugin/FindNew.php and it'd just be a case of changing that value to the desired amount.

Or, if you wanted to base it on the actual max search results option (which I'm tempted to do for the next release) then you'd change it to:
PHP:
$maxResults = $this->options->maximumSearchResults;

I'm going to move this to bugs so we can consider changing it for the next release.
If one of our team makes this edit, will it be overwritten by your new update with the new changes, or will it simply duplicate this change to a T?

Last thing we want is anymore confusion or things to fix, we're still knee deep in the setup/tweaking/fixing phase. :)

Thank you.
 
Back
Top Bottom