1 Return-Path: <olly@survex.com>
\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 BFEDA4196F0
\r
6 for <notmuch@notmuchmail.org>; Thu, 15 Apr 2010 23:58:16 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.301 tagged_above=-999 required=5
\r
12 tests=[BAYES_40=-0.001, RCVD_IN_DNSWL_MED=-2.3] 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 5j1bxmfC8FfC for <notmuch@notmuchmail.org>;
\r
16 Thu, 15 Apr 2010 23:58:15 -0700 (PDT)
\r
17 Received: from atreus.tartarus.org (atreus.tartarus.org [80.252.125.10])
\r
18 by olra.theworths.org (Postfix) with ESMTP id B24A7431FC1
\r
19 for <notmuch@notmuchmail.org>; Thu, 15 Apr 2010 23:58:15 -0700 (PDT)
\r
20 Received: from olly by atreus.tartarus.org with local (Exim 4.69)
\r
21 (envelope-from <olly@survex.com>)
\r
22 id 1O2fVG-00041o-3F; Fri, 16 Apr 2010 07:58:14 +0100
\r
23 Date: Fri, 16 Apr 2010 07:58:14 +0100
\r
24 From: Olly Betts <olly@survex.com>
\r
25 To: Sebastian Spaeth <Sebastian@SSpaeth.de>
\r
26 Subject: Re: [PATCH] allow to not sort the search results
\r
27 Message-ID: <20100416065814.GO10323@survex.com>
\r
28 References: <1271226655-5672-1-git-send-email-Sebastian@SSpaeth.de>
\r
29 <20100414065525.GA11770@jdc.jasonjgw.net>
\r
30 <87hbnebhg0.fsf@SSpaeth.de>
\r
31 <loom.20100415T144148-25@post.gmane.org>
\r
32 <87eiifj433.fsf@SSpaeth.de>
\r
34 Content-Type: text/plain; charset=us-ascii
\r
35 Content-Disposition: inline
\r
36 In-Reply-To: <87eiifj433.fsf@SSpaeth.de>
\r
37 User-Agent: Mutt/1.5.18 (2008-05-17)
\r
38 Cc: notmuch@notmuchmail.org
\r
39 X-BeenThere: notmuch@notmuchmail.org
\r
40 X-Mailman-Version: 2.1.13
\r
42 List-Id: "Use and development of the notmuch mail system."
\r
43 <notmuch.notmuchmail.org>
\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
47 List-Post: <mailto:notmuch@notmuchmail.org>
\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
51 X-List-Received-Date: Fri, 16 Apr 2010 06:58:17 -0000
\r
53 On Fri, Apr 16, 2010 at 08:37:04AM +0200, Sebastian Spaeth wrote:
\r
54 > On 2010-04-15, Olly Betts wrote:
\r
55 > > Also, sorting by relevance requires more calculations and may require
\r
56 > > fetching additional data (document length for example).
\r
58 > > So I think it would make sense for --sort=relevance and --sort=unsorted to
\r
59 > > be separate options.
\r
61 > Now I am a bit confused. The API docs state that sort_by_relevance is
\r
62 > the default. So by skipping any sort_by_value() will that incur the additional
\r
63 > calculations (with our BoolWeight set?). All I want is the fasted way
\r
64 > to return a searched set of docs :-).
\r
66 Yes, sort_by_relevance() is the default. But if you set BoolWeight as the
\r
67 weighting scheme then the relevance is simply zero, and Xapian doesn't have
\r
68 to fetch any statistics and calculate a score from them. When documents
\r
69 have exactly equal relevance weight, then the docid order is used. So
\r
70 although sort_by_relevance() is technically still on with BoolWeight, by
\r
71 "sorting by relevance" I wasn't talking about this case.
\r
73 So --sort=unsorted and --sort=relevance would only differ in code by the former
\r
74 setting BoolWeight and the latter not.
\r