search performance: Stop at max_items.

Once we have max_items results, stop trying
to get more items.

This should really help large realms when
you do a search on streams that turns up
more than N streams (where N is about 12).
We won't even bother to find people.
This commit is contained in:
Steve Howell
2019-12-25 15:58:11 +00:00
committed by Tim Abbott
parent 8406d34145
commit ab34ee0800
6 changed files with 23 additions and 8 deletions

View File

@@ -81,7 +81,7 @@ exports.initialize = function () {
return suggestions.strings;
},
fixed: true,
items: 12,
items: search_suggestion.max_num_of_search_results,
helpOnEmptyStrings: true,
naturalSearch: true,
highlighter: function (item) {