From ec7e7a9eabe210e1a75eeeb68f45dc1d6e5a7731 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 3 May 2024 22:48:26 +0100 Subject: xapian: Wrap FieldProcessor. * xapian.i.in (GuileXapianFieldProcessorWrapper): New class. * xapian/xapian.scm (field-processor): New public function. --- xapian/xapian.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'xapian') diff --git a/xapian/xapian.scm b/xapian/xapian.scm index 80b4b9b..8b8b952 100644 --- a/xapian/xapian.scm +++ b/xapian/xapian.scm @@ -1,5 +1,5 @@ ;;; guile-xapian --- Guile bindings for Xapian -;;; Copyright © 2020, 2022 Arun Isaac +;;; Copyright © 2020, 2022, 2024 Arun Isaac ;;; Copyright © 2021 Bob131 ;;; ;;; This file is part of guile-xapian. @@ -53,6 +53,7 @@ query-and query-or query-filter + field-processor enquire enquire-mset mset-item-docid @@ -234,6 +235,12 @@ In a non-weighted context, @code{query-filter} and @code{query-and} are equivalent." (apply query-combine (Query-OP-FILTER) (Query-MatchAll) queries)) +(define (field-processor proc) + "Return a @code{FieldProcessor} object that calls +@var{proc} to process its field. @var{proc} is a procedure that, given +a string, must return a @code{Query} object." + (new-GuileXapianFieldProcessorWrapper proc)) + (define (get-flag flag-thunk value) (if value (flag-thunk) 0)) -- cgit v1.2.3