diff options
author | Arun Isaac | 2024-05-07 23:10:01 +0100 |
---|---|---|
committer | Arun Isaac | 2024-05-07 23:10:01 +0100 |
commit | 921ae11562125cd1ea83e45f4c9a0f0b29bf01f7 (patch) | |
tree | f33fd9a818759d9c4daedb8876da5cca43c6d64f /xapian | |
parent | 5f5b155eb0774a0e27b8fc68ca16ab8a9dfb4d8d (diff) | |
download | guile-xapian-921ae11562125cd1ea83e45f4c9a0f0b29bf01f7.tar.gz guile-xapian-921ae11562125cd1ea83e45f4c9a0f0b29bf01f7.tar.lz guile-xapian-921ae11562125cd1ea83e45f4c9a0f0b29bf01f7.zip |
xapian: Accept range processors in parse-query.
* xapian/xapian.scm (parse-query): Accept range processors.
Diffstat (limited to 'xapian')
-rw-r--r-- | xapian/xapian.scm | 4 |
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))) |