From da901d6d200f12cbe3c2a8a6e6fb730f77354a29 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 10 Mar 2025 01:28:27 +0000 Subject: xapian: Preserve order of queries when combining them. The order is important for operations such as OP_FILTER. * xapian/xapian.scm (query-combine): Preserve order of queries. --- xapian/xapian.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xapian/xapian.scm') diff --git a/xapian/xapian.scm b/xapian/xapian.scm index 64042a2..1d7c961 100644 --- a/xapian/xapian.scm +++ b/xapian/xapian.scm @@ -259,9 +259,9 @@ on the database object." (new-Query term)) (define (query-combine combine-operator default . queries) - (reduce (cut new-Query combine-operator <> <>) - default - queries)) + (reduce-right (cut new-Query combine-operator <> <>) + default + queries)) (define (query-and . queries) "Return a query matching only documents matching all @var{queries}. -- cgit 1.4.1