1 Return-Path: <Sebastian@SSpaeth.de>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 1EF484196F0
\r
6 for <notmuch@notmuchmail.org>; Thu, 15 Apr 2010 23:37:10 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.001 tagged_above=-999 required=5
\r
12 tests=[BAYES_20=-0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id ES5sgc7es59J for <notmuch@notmuchmail.org>;
\r
16 Thu, 15 Apr 2010 23:37:09 -0700 (PDT)
\r
17 Received: from homiemail-a20.g.dreamhost.com (caiajhbdcaid.dreamhost.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id 1A099431FC1
\r
20 for <notmuch@notmuchmail.org>; Thu, 15 Apr 2010 23:37:09 -0700 (PDT)
\r
21 Received: from sspaeth.de (unknown [195.190.188.219])
\r
22 by homiemail-a20.g.dreamhost.com (Postfix) with ESMTPA id 97E437EC064;
\r
23 Thu, 15 Apr 2010 23:37:06 -0700 (PDT)
\r
24 Received: by sspaeth.de (sSMTP sendmail emulation);
\r
25 Fri, 16 Apr 2010 08:37:04 +0200
\r
26 From: "Sebastian Spaeth" <Sebastian@SSpaeth.de>
\r
27 To: Olly Betts <olly@survex.com>, notmuch@notmuchmail.org
\r
28 Subject: Re: [PATCH] allow to not sort the search results
\r
29 In-Reply-To: <loom.20100415T144148-25@post.gmane.org>
\r
30 References: <1271226655-5672-1-git-send-email-Sebastian@SSpaeth.de>
\r
31 <20100414065525.GA11770@jdc.jasonjgw.net>
\r
32 <87hbnebhg0.fsf@SSpaeth.de>
\r
33 <loom.20100415T144148-25@post.gmane.org>
\r
34 Date: Fri, 16 Apr 2010 08:37:04 +0200
\r
35 Message-ID: <87eiifj433.fsf@SSpaeth.de>
\r
36 User-Agent: notmuch version 0.1-167-g21df013 (Emacs
\r
37 23.1.1/x86_64-pc-linux-gnu)
\r
39 Content-Type: text/plain; charset=us-ascii
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Fri, 16 Apr 2010 06:37:11 -0000
\r
54 On 2010-04-15, Olly Betts wrote:
\r
56 > > I would be happy to have it called --sort=relevance too, the unsorted
\r
57 > > points out potential performance improvements a bit better, IMHO
\r
58 > > (although they seem to be really small with a warm cache).
\r
60 > When using the results of a search to add/remove tags, there's likely to be
\r
61 > an additional win from --sort=unsorted as documents will now be processed
\r
62 > in docid order which will tend to have a more cache friendly locality of
\r
65 Olly was right in that even for "notmuch tag" we were sorting the
\r
66 results by date before applying tag changes. I have slightly reworked my
\r
67 patch to have notmuch tag avoid doing that. I also split up the patch in
\r
68 3 patches that do one thing each.
\r
71 1: Introduce NOTMUCH_SORT_UNSORTED
\r
72 2: Introduce notmuch search --sort=unsorted
\r
73 3: Make notmuch tag not sort results by date
\r
75 #2 is the one I am least sure about, I don't know if there is a use case
\r
76 for notmuch search returning unsorted results. But 1 & 3 are useful at
\r
79 > Also, sorting by relevance requires more calculations and may require fetching
\r
80 > additional data (document length for example).
\r
82 > So I think it would make sense for --sort=relevance and --sort=unsorted to be
\r
85 Now I am a bit confused. The API docs state that sort_by_relevance is
\r
86 the default. So by skipping any sort_by_value() will that incur the additional
\r
87 calculations (with our BoolWeight set?). All I want is the fasted way
\r
88 to return a searched set of docs :-).
\r
90 Patches 1-3 follow as reply to this one
\r