From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 192C36DE0196 for ; Sat, 20 Oct 2018 10:15:34 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.283 X-Spam-Level: X-Spam-Status: No, score=-0.283 tagged_above=-999 required=5 tests=[AWL=-0.083, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id THulRZuB2td1 for ; Sat, 20 Oct 2018 10:15:32 -0700 (PDT) Received: from jb55.com (jb55.com [45.79.91.128]) by arlo.cworth.org (Postfix) with ESMTPS id B050C6DE0141 for ; Sat, 20 Oct 2018 10:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d= jb55.com; h=from:to:subject:date:message-id; s=default; bh=9nrFmfG0Vh1rBXnx06nzbcrQUQ8PcWvHEOhTNGxD8FI=; b=TJ6RnyAuJYmkENqLJOPviFAhcwOKau3tg8nKry8GzH764AngYjDehukrqI3ENI/87gvNNWk4OsBKMmu4ONN8soOSRpipLpTyV5ynwZSjkoNYSsBmpV6CXnLthRAlD/qTxcjUpoLPvaLuyltbe2THccAnS+wnoCy6ZACO7wtrwVDQxt67qywW6QtMAITO1zifxBE6l67aR69+QzVTIFG2tk38/eBvwfr4aT3sNLbi/gHx29Nj+/Zs1U+Nn0TVbNAkU35oBtID2rxeNYQF0Wy3J85EV02dBIIXUOxjq7/o+u/18lwM3vIxKnmi5+qkd44iIqDsET2LG0YYkOtYzfTgyQ== Received: from jb55.com (S010660e327dca171.vc.shawcable.net [24.84.152.187]) by jb55.com (OpenSMTPD) with ESMTPSA id 430d46d3 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Sat, 20 Oct 2018 17:15:30 +0000 (UTC) From: William Casarin To: David Bremner , notmuch@notmuchmail.org Subject: Re: Proposed New sort API In-Reply-To: <87lg6su9l1.fsf@tethera.net> References: <20171210154956.4049-1-david@tethera.net> <87d0sj6cr6.fsf@jb55.com> <87lg6su9l1.fsf@tethera.net> Date: Sat, 20 Oct 2018 10:15:30 -0700 Message-ID: <871s8kletp.fsf@jb55.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2018 17:15:34 -0000 David Bremner writes: > William Casarin writes: > >> Another thought I had that I wanted to throw out there for >> consideration. It would be nice to be able to sort by "popular" threads, >> aka sort by the number of messages in each thread. Not sure if this is >> an easy thing to do at the query level? > > I don't see how to manage it as a xapian query. In the current database > schema xapian doesn't really know about threads, except that messages > know what thread they belong to. I noticed notmuch-search shows the number of messages in the thread, perhaps you could just sort on that value when returning the results?