From: Olly Betts <olly@survex.com>
To: Sebastian Spaeth <Sebastian@SSpaeth.de>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] allow to not sort the search results
Date: Fri, 16 Apr 2010 07:58:14 +0100 [thread overview]
Message-ID: <20100416065814.GO10323@survex.com> (raw)
In-Reply-To: <87eiifj433.fsf@SSpaeth.de>
On Fri, Apr 16, 2010 at 08:37:04AM +0200, Sebastian Spaeth wrote:
> On 2010-04-15, Olly Betts wrote:
> > Also, sorting by relevance requires more calculations and may require
> > fetching additional data (document length for example).
> >
> > So I think it would make sense for --sort=relevance and --sort=unsorted to
> > be separate options.
>
> Now I am a bit confused. The API docs state that sort_by_relevance is
> the default. So by skipping any sort_by_value() will that incur the additional
> calculations (with our BoolWeight set?). All I want is the fasted way
> to return a searched set of docs :-).
Yes, sort_by_relevance() is the default. But if you set BoolWeight as the
weighting scheme then the relevance is simply zero, and Xapian doesn't have
to fetch any statistics and calculate a score from them. When documents
have exactly equal relevance weight, then the docid order is used. So
although sort_by_relevance() is technically still on with BoolWeight, by
"sorting by relevance" I wasn't talking about this case.
So --sort=unsorted and --sort=relevance would only differ in code by the former
setting BoolWeight and the latter not.
Cheers,
Olly
next prev parent reply other threads:[~2010-04-16 6:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-14 6:30 [PATCH] allow to not sort the search results Sebastian Spaeth
2010-04-14 6:55 ` Jason White
2010-04-14 7:51 ` Sebastian Spaeth
2010-04-15 12:54 ` Olly Betts
2010-04-16 6:37 ` Sebastian Spaeth
2010-04-16 6:38 ` [PATCH 1/3] query.cc: allow to return query results unsorted Sebastian Spaeth
2010-04-16 6:38 ` [PATCH 2/3] notmuch-search: Introduce --sort=unsorted Sebastian Spaeth
2010-04-16 6:38 ` [PATCH 3/3] notmuch-tag: don't sort messages before applying tag changes Sebastian Spaeth
2010-04-16 6:58 ` Olly Betts [this message]
2010-04-18 13:56 ` [PATCH] allow to not sort the search results Sebastian Spaeth
2010-04-21 23:09 ` Carl Worth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100416065814.GO10323@survex.com \
--to=olly@survex.com \
--cc=Sebastian@SSpaeth.de \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).