Subject: [bug#60410] [PATCH 2/7] xapian: Declare some prefixes as boolean.

From: Ricardo Wurmus <[email-masked]>
Date: Mon, 02 Jan 2023 00:19:54 +0100

Hi Arun,

> Some prefixes will only ever be used to filter the rest of the query
> and not for matching approximately using relevance weighting
> schemes. Such prefixes should be indexed as boolean prefixes.
[…]
> @@ -324,14 +328,14 @@ intact."
>               ;; prefixes for field search.
>               (query (parse-query* querystring*
>                                    #:stemmer (make-stem "en")
> -                                  #:prefixes '(("submitter" . "A")
> -                                               ("author"    . "XA")
> -                                               ("subject"   . "S")
> -                                               ("owner"     . "XO")
> -                                               ("severity"  . "XS")
> -                                               ("tag"       . "XT")
> -                                               ("status"    . "XSTATUS")
> -                                               ("msgid"     . "XU"))))
> +                                  #:prefixes '(("subject" . "S"))
> +                                  #:boolean-prefixes '(("author"    . "XA")
> +                                                       ("msgid"     . "XU")
> +                                                       ("owner"     . "XO")
> +                                                       ("severity"  . "XS")
> +                                                       ("status"    . "XSTATUS")
> +                                                       ("submitter" . "A")
> +                                                       ("tag"       . "XT"))))

This breaks two tests, which allow searching for submitters with partial
names, e.g. “Ricardo” instead of my full name and email address.

I think we should move submitter, author, and owner back to the list of
regular prefixes.

-- 
Ricardo