diff options
author | Arun Isaac | 2023-01-22 23:22:36 +0000 |
---|---|---|
committer | Arun Isaac | 2023-01-23 00:28:12 +0000 |
commit | 0854a668d258fbef4a5b268a8db9ddf036fd5015 (patch) | |
tree | e49db0bb9cd05c1394152063900bc3e2b37c46de | |
parent | 22f7cac8e0353120522a5382d81d2ce3a2c4abc2 (diff) | |
download | tissue-0854a668d258fbef4a5b268a8db9ddf036fd5015.tar.gz tissue-0854a668d258fbef4a5b268a8db9ddf036fd5015.tar.lz tissue-0854a668d258fbef4a5b268a8db9ddf036fd5015.zip |
search: Limit to 1000 search results by default.
* tissue/search.scm (search-fold): Limit to 1000 search results by
default.
* tissue/web/server.scm (search-handler): Limit to 1000 search results
by default.
-rw-r--r-- | tissue/search.scm | 4 | ||||
-rw-r--r-- | tissue/web/server.scm | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tissue/search.scm b/tissue/search.scm index bc60c19..5ac5af0 100644 --- a/tissue/search.scm +++ b/tissue/search.scm @@ -1,5 +1,5 @@ ;;; tissue --- Text based issue tracker -;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net> +;;; Copyright © 2022, 2023 Arun Isaac <arunisaac@systemreboot.net> ;;; ;;; This file is part of tissue. ;;; @@ -97,7 +97,7 @@ when PRED returns #f." query)) (define* (search-fold proc initial db search-query - #:key (offset 0) (maximum-items (database-document-count db))) + #:key (offset 0) (maximum-items 1000)) "Search xapian database DB using SEARCH-QUERY and fold over the results using PROC and INITIAL. diff --git a/tissue/web/server.scm b/tissue/web/server.scm index ad74d6b..95bed70 100644 --- a/tissue/web/server.scm +++ b/tissue/web/server.scm @@ -1,5 +1,5 @@ ;;; tissue --- Text based issue tracker -;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net> +;;; Copyright © 2022, 2023 Arun Isaac <arunisaac@systemreboot.net> ;;; ;;; This file is part of tissue. ;;; @@ -124,7 +124,7 @@ query. QUERY and FILTER are Xapian Query objects." (Enquire-set-sort-by-value enquire 0 #t)) enquire) #:offset 0 - #:maximum-items (database-document-count db)) + #:maximum-items 1000) #:matches (matches db query (Query-MatchAll)) #:matched-open-issues (matches db query (assq-ref filter-alist 'open-issue)) #:matched-closed-issues (matches db query (assq-ref filter-alist 'closed-issue)) |