summaryrefslogtreecommitdiff
path: root/tissue
diff options
context:
space:
mode:
authorArun Isaac2022-06-29 15:29:06 +0530
committerArun Isaac2022-06-29 15:30:26 +0530
commit2741ad828111a0bd13e6e970f4d414ceae7ec0fb (patch)
tree38a6153531f2b93f527996bc66367a441543e35e /tissue
parentd9c130eb1119153874abdcdc7d4e8e84580b40ca (diff)
downloadtissue-2741ad828111a0bd13e6e970f4d414ceae7ec0fb.tar.gz
tissue-2741ad828111a0bd13e6e970f4d414ceae7ec0fb.tar.lz
tissue-2741ad828111a0bd13e6e970f4d414ceae7ec0fb.zip
search: Return all results by default.
* tissue/search.scm (search-fold, search-map): Set default value of #:maximum-items argument to all documents. * bin/tissue (tissue-search): Do not pass #:maximum-items to search-map.
Diffstat (limited to 'tissue')
-rw-r--r--tissue/search.scm6
1 files changed, 4 insertions, 2 deletions
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.