From ed9aad811eae0dd8f2f992afd841b9f5e81481cd Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 29 Jun 2022 00:38:36 +0530 Subject: search: Limit number of search results. * tissue/search.scm (search-fold, search-map): Accept maximum number of search results and offset as arguments. * bin/tissue (tissue-search): Do not print number of search results. Use search-map instead of search-fold. --- bin/tissue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/tissue b/bin/tissue index ce6f4f7..7cc4a95 100755 --- a/bin/tissue +++ b/bin/tissue @@ -86,11 +86,7 @@ Search issues using SEARCH-QUERY. (args (call-with-database %xapian-index (lambda (db) - (format #t "total ~a~%" - (search-fold (lambda (document mset count) - (print document mset) - (1+ count)) - 0 db (string-join args)))))))) + (search-map print db (string-join args))))))) (define tissue-show (match-lambda* -- cgit v1.2.3