From 38f3f82a77ed4782a9c4e1b4e5a6d9d4c71390a2 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Tue, 11 Jul 2023 13:11:50 +0200 Subject: 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. --- page.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'page.h') diff --git a/page.h b/page.h index 749ebd0..7d477ff 100644 --- a/page.h +++ b/page.h @@ -2,6 +2,7 @@ #define PAGE_H #include "http.h" +#include #include struct page_quota @@ -27,6 +28,7 @@ struct page_search const char *root; size_t n; + bool limit_exceeded; }; struct page_rm -- cgit v1.2.3