summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/tissue5
-rw-r--r--tissue/search.scm6
2 files changed, 5 insertions, 6 deletions
diff --git a/bin/tissue b/bin/tissue
index ffe8a34..247a45f 100755
--- a/bin/tissue
+++ b/bin/tissue
@@ -88,10 +88,7 @@ Search issues using SEARCH-QUERY.
(lambda (db)
(call-with-output-pipe
(lambda (port)
- (search-map (cut print <> <> port)
- db
- (string-join args)
- #:maximum-items (database-document-count db)))
+ (search-map (cut print <> <> port) db (string-join args)))
(or (getenv "PAGER")
"less")
"--raw"))))))
diff --git a/tissue/search.scm b/tissue/search.scm
index 7134ab9..ceaa9a1 100644
--- a/tissue/search.scm
+++ b/tissue/search.scm
@@ -25,7 +25,8 @@
#:export (search-fold
search-map))
-(define* (search-fold proc initial db search-query #:key (offset 0) (maximum-items 10))
+(define* (search-fold proc initial db search-query
+ #:key (offset 0) (maximum-items (database-document-count db)))
"Search xapian database DB using SEARCH-QUERY and fold over the
results using PROC and INITIAL.
@@ -67,7 +68,8 @@ return."
(enquire-mset (enquire db query)
#:maximum-items maximum-items))))
-(define* (search-map proc db search-query #:key (offset 0) (maximum-items 10))
+(define* (search-map proc db search-query
+ #:key (offset 0) (maximum-items (database-document-count db)))
"Search xapian database DB using SEARCH-QUERY and map over the results
using PROC.