Re: [Extra] SEARCHRES / IMAP4rev2 clarifications

Timo Sirainen <timo@sirainen.com> Mon, 16 March 2020 11:52 UTC

Return-Path: <timo@sirainen.com>
X-Original-To: extra@ietfa.amsl.com
Delivered-To: extra@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2BBB43A236B for <extra@ietfa.amsl.com>; Mon, 16 Mar 2020 04:52:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Oj6JvZS_jStH for <extra@ietfa.amsl.com>; Mon, 16 Mar 2020 04:52:39 -0700 (PDT)
Received: from sirainen.com (mail.sirainen.com [94.237.26.55]) by ietfa.amsl.com (Postfix) with ESMTP id 18A1F3A2372 for <extra@ietf.org>; Mon, 16 Mar 2020 04:52:38 -0700 (PDT)
Received: from [172.20.10.2] (unknown [85.76.111.113]) by sirainen.com (Postfix) with ESMTPSA id 1B2E22B3C8B; Mon, 16 Mar 2020 11:52:37 +0000 (UTC)
From: Timo Sirainen <timo@sirainen.com>
Message-Id: <ED927AB6-C129-440B-B3E0-CDB54412DF17@sirainen.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_05F39232-2CE6-4422-B410-5673AECDC139"
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\))
Date: Mon, 16 Mar 2020 13:52:32 +0200
In-Reply-To: <6805c44c-83ce-49f7-2f24-e5b9a97479b4@isode.com>
Cc: extra@ietf.org
To: Alexey Melnikov <alexey.melnikov@isode.com>
References: <741FE532-1213-49E9-901F-46EECB7A223C@sirainen.com> <6805c44c-83ce-49f7-2f24-e5b9a97479b4@isode.com>
X-Mailer: Apple Mail (2.3608.60.0.2.5)
Archived-At: <https://mailarchive.ietf.org/arch/msg/extra/PTKVD5vnKpl2TgHPClv_DrFZGB0>
Subject: Re: [Extra] SEARCHRES / IMAP4rev2 clarifications
X-BeenThere: extra@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Email mailstore and eXtensions To Revise or Amend <extra.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/extra>, <mailto:extra-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/extra/>
List-Post: <mailto:extra@ietf.org>
List-Help: <mailto:extra-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/extra>, <mailto:extra-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Mar 2020 11:52:52 -0000

On 13. Mar 2020, at 15.43, Alexey Melnikov <alexey.melnikov@isode.com> wrote:
> 
>> 4) Interaction of FUZZY and SEARCHRES: SEARCH RETURN (SAVE MIN RELEVANCY)
>> 
>> Well, this is probably clear enough that RELEVANCY shouldn't affect $ results? But the FUZZY RFC doesn't specify very clearly how RELEVANCY should interact with MIN, MAX or COUNT options. Maybe it could use errata to clarify? I suppose with MIN/MAX only the one relevancy should be returned, and with COUNT all the relevancies?
> 
> We probably need to do an update at some point, but submitting errata is sensible in this case.

This is actually getting a bit confusing as well. The simple cases:

RETURN (ALL RELEVANCY) : return ALL relevancies
RETURN (MIN RELEVANCY) : return only the MIN's relevancy
RETURN (MAX RELEVANCY) : return only the MAX's relevancy
RETURN (PARTIAL n:m RELEVANCY) : return only the PARTIAL result's relevancies

The more confusing ones:

RETURN (MIN MAX RELEVANCY) : return MIN and MAX relevancies. But what if MIN=MAX, i.e. only one result? Is there 1 or 2 relevancies returned?
RETURN (MIN MAX PARTIAL n:m RELEVANCY) : Similar to above - what if MIN/MAX overlaps the PARTIAL results?
RETURN (RELEVANCY) : Maybe this should be an error?
RETURN (COUNT RELEVANCY) : Does this even make sense either?
RETURN (MIN MAX PARTIAL n:m COUNT RELEVANCY) : Should COUNT change anything?

Maybe MIN and MAX should always prepend and append the min/max relevancies, regardless of whether they overlap each others or PARTIAL. And in COUNT case I'd make it a no-op regarding RELEVANCY.