diff options
Diffstat (limited to 'xapian/xapian.scm')
| -rw-r--r-- | xapian/xapian.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xapian/xapian.scm b/xapian/xapian.scm index c769a98..e83fae0 100644 --- a/xapian/xapian.scm +++ b/xapian/xapian.scm @@ -1,5 +1,5 @@ ;;; guile-xapian --- Guile bindings for Xapian -;;; Copyright © 2020, 2022, 2024, 2025 Arun Isaac <arunisaac@systemreboot.net> +;;; Copyright © 2020, 2022, 2024–2026 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2021 Bob131 <bob@bob131.so> ;;; ;;; This file is part of guile-xapian. @@ -55,6 +55,7 @@ query query-and query-or + query-xor query-filter prefixed-range-processor suffixed-range-processor @@ -308,6 +309,14 @@ In a weighted context, the weight is the sum of the weights for matching queries." (apply query-combine (Query-OP-OR) (Query-MatchNothing) queries)) +(define (query-xor . queries) + "Return a query matching documents which an odd number of @var{queries} +match. + +In a weighted context, the weight is the sum of the weights for +matching queries." + (apply query-combine (Query-OP-XOR) (Query-MatchNothing) queries)) + (define (query-filter . queries) "Return a query matching only documents matching all @var{queries}, but only take weight from the first of @var{queries}. |
