From ede26b808188eb4d14c6b4181c933dfc09c0a22e Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 5 Mar 2020 19:43:21 +0530 Subject: xapian: Wrap Enquire-get-mset using keyword arguments. * xapian/xapian.scm (enquire-mset): Introduce offset and maximum-items keyword arguments. * examples/search.scm (search): Pass pagesize as keyword argument to enquire-mset. Remove argument offset. --- examples/search.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/search.scm b/examples/search.scm index fee945e..e8f8aa5 100644 --- a/examples/search.scm +++ b/examples/search.scm @@ -25,7 +25,7 @@ (match record ((description title identifier) title))) -(define* (search dbpath querystring #:key (offset 0) (pagesize 10)) +(define* (search dbpath querystring #:key (pagesize 10)) ;; Open database for reading. call-with-database automatically ;; closes the database once we're done. (call-with-database dbpath @@ -49,7 +49,8 @@ ;; Get an Enquire object from the database with the ;; search results. Then, extract the MSet from the ;; Enquire object. - (enquire-mset (enquire db query) offset pagesize)))))) + (enquire-mset (enquire db query) + #:maximum-items pagesize)))))) ;; Handle command line arguments (match (command-line) -- cgit v1.2.3