aboutsummaryrefslogtreecommitdiff
path: root/xapian
diff options
context:
space:
mode:
Diffstat (limited to 'xapian')
-rw-r--r--xapian/xapian.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/xapian/xapian.scm b/xapian/xapian.scm
index f395162..7222e69 100644
--- a/xapian/xapian.scm
+++ b/xapian/xapian.scm
@@ -166,7 +166,7 @@ generated."
(define increase-termpos! TermGenerator-increase-termpos)
-(define* (parse-query querystring #:key stemmer stemming-strategy (prefixes '()))
+(define* (parse-query querystring #:key stemmer stemming-strategy (prefixes '()) (range-processors '()))
(let ((queryparser (new-QueryParser)))
(QueryParser-set-stemmer queryparser stemmer)
(when stemming-strategy
@@ -175,6 +175,8 @@ generated."
((field . prefix)
(QueryParser-add-prefix queryparser field prefix)))
prefixes)
+ (for-each (cut QueryParser-add-rangeprocessor queryparser <>)
+ range-processors)
(let ((query (QueryParser-parse-query queryparser querystring)))
(delete-QueryParser queryparser)
query)))