Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DE26D951F for ; Tue, 27 Mar 2012 19:21:40 +0000 (UTC) Received: (qmail 74251 invoked by uid 500); 27 Mar 2012 19:21:39 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 74211 invoked by uid 500); 27 Mar 2012 19:21:39 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 74203 invoked by uid 99); 27 Mar 2012 19:21:39 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2012 19:21:39 +0000 Received: from localhost (HELO mail-yx0-f180.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2012 19:21:39 +0000 Received: by yenl4 with SMTP id l4so314115yen.11 for ; Tue, 27 Mar 2012 12:21:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.194.103 with SMTP id hv7mr43786061pbc.133.1332876097892; Tue, 27 Mar 2012 12:21:37 -0700 (PDT) Received: by 10.142.223.8 with HTTP; Tue, 27 Mar 2012 12:21:37 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Mar 2012 20:21:37 +0100 Message-ID: Subject: Re: Sorting CouchDB data using couch-lucene From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable We can only guess what Jason had in mind at step 3. Lucene can sort by any appropriately indexed field but here, as in the single-pass map/reduce view, the value you want is not available. I think someone had a crack at chained map-reduce other than Cloudant but I don't recall the project name. Also, I know Benoit is working on adding a _changes feed for views, which should allow chained m-r too. B. On 27 March 2012 18:28, nicholas a. evans wrote: > On Tue, Mar 27, 2012 at 1:14 PM, Robert Newson wrote= : >> cross-posting is generally bad form as it splits the conversation. If >> I answer here or on SO, someone potentially loses out. > > Good point. =A0Sorry about that. > >> That said, couchdb-lucene is an independent index, sourced from the >> database. As such, it has no access to the reduced values nor does it >> have an equivalent feature. Where did you see that suggestion? > > I saw that suggestion at http://stackoverflow.com/a/2821476/110681 > > I think the idea wasn't so much that couchdb-lucene would read from > the view as much that couchdb-lucene would give me a completely > different way to approach the problem. =A0Is there some way for lucene > to index the data so that it could give me ranked results? =A0E.g. if > every document has a doc.sender, is there some way to store the > senders in lucene and then ask for a ranking of senders with their > counts? =A0I don't know enough about lucene or full-text indexing in > general, so I hoped and assumed there might be some way to twist the > lucene index to do my bidding. =A0:) > > If lucene can't help out and no one knows of an open source chained > map-reduce views implementation, then the polyglot persistence > approach sounds best to me, since redis zsets are perfect for this > particular task. > > Thanks. > -- > Nick