diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-07-11 13:11:50 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-07-11 13:27:49 +0200 |
| commit | 38f3f82a77ed4782a9c4e1b4e5a6d9d4c71390a2 (patch) | |
| tree | 4a0d1c0a76f1e38562ad544f0fca5ce80cec32d6 /page.h | |
| parent | 59e17afe291f9df52d2334b92e88a889c2fe8f6a (diff) | |
Limit amount of search results
When a user enters a search term that is too generic, slcl would
generate a long list of search results, where this generation could have
a big impact on the server performance and its available resources.
Therefore, it is reasonable to limit the number of search results to an
arbitrary limit, so that users are forced to enter a more specific
search term in order to achieve more relevant results.
Diffstat (limited to 'page.h')
| -rw-r--r-- | page.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2,6 +2,7 @@ #define PAGE_H #include "http.h" +#include <stdbool.h> #include <stddef.h> struct page_quota @@ -27,6 +28,7 @@ struct page_search const char *root; size_t n; + bool limit_exceeded; }; struct page_rm |
