From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.90.27.4 with SMTP id a4cs204934aga; Mon, 14 Dec 2009 15:19:44 -0800 (PST) Received: by 10.229.50.136 with SMTP id z8mr2999250qcf.78.1260832783561; Mon, 14 Dec 2009 15:19:43 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 4si11856612qwe.5.2009.12.14.15.19.43; Mon, 14 Dec 2009 15:19:43 -0800 (PST) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 4518C19782D4; Mon, 14 Dec 2009 18:19:43 -0500 (EST) X-Greylist: delayed 412 seconds by postgrey-1.31 at rubyforge.org; Mon, 14 Dec 2009 18:19:37 EST Received: from olra.theworths.org (u15218177.onlinehome-server.com [82.165.184.25]) by rubyforge.org (Postfix) with ESMTP id 7C74C1858289 for ; Mon, 14 Dec 2009 18:19:37 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5AEFA431FBD; Mon, 14 Dec 2009 15:12:42 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WJEnRrIob-h8; Mon, 14 Dec 2009 15:12:41 -0800 (PST) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id B5AC6431FAE; Mon, 14 Dec 2009 15:12:41 -0800 (PST) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id 6B0BF254307; Mon, 14 Dec 2009 15:12:41 -0800 (PST) From: Carl Worth To: Michael McDermott , sup-talk In-Reply-To: <1260809732-sup-4895@zion> References: <1260809732-sup-4895@zion> Date: Mon, 14 Dec 2009 15:12:41 -0800 Message-ID: <87eimx2lqu.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Subject: Re: [sup-talk] Sorting X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0996943253==" Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org --===============0996943253== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= On Mon, 14 Dec 2009 11:01:39 -0600, Michael McDermott wrote: > After running a search in Sup, is there any way to sort the result set? Or, > perhaps, specify the ordering in the query? (ala SQL) The Xapian database (which Sup uses optionally now and perhaps exclusively in the future) allows results to be sorted by anything stored in a "value" field of the documents. If I recall correctly, Sup is currently storing three things in "value" fields: 1. Message ID 2. Thread ID (which is Message ID of a representative message) 3. Date So it's quite easy to have Xapian return things based on an ordering of any one of those values (in either direction). And this does not require fetching all documents. Sorting on anything else would require either fetching all documents, (and doing the sort in the user-interface), or else storing an additional value for each document in the database. What is it that you actually want to sort on? -carl --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLJsZp6JDdNq8qSWgRAohMAKCA2PQCJHjXIvThFfKjCtFXt/cF3gCfSO0c 6dK2KqIkeJg7xfMs/Yb7pGw= =fvK9 -----END PGP SIGNATURE----- --=-=-=-- --===============0996943253== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk --===============0996943253==--