Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 91879 invoked from network); 29 Jun 2010 14:17:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Jun 2010 14:17:54 -0000 Received: (qmail 5849 invoked by uid 500); 29 Jun 2010 14:17:53 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 5741 invoked by uid 500); 29 Jun 2010 14:17:52 -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 5733 invoked by uid 99); 29 Jun 2010 14:17:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jun 2010 14:17:52 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of luke.driscoll@gmail.com designates 209.85.160.52 as permitted sender) Received: from [209.85.160.52] (HELO mail-pw0-f52.google.com) (209.85.160.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jun 2010 14:17:46 +0000 Received: by pwj10 with SMTP id 10so1697928pwj.11 for ; Tue, 29 Jun 2010 07:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=myrz9GMfFQQpda87k/VFfHm39+zwlHK5aavx1RkTjpo=; b=dPtfOOGoQBAnWmVzDLzBN9hyNn7ie9bFL24bTBQ7onM69RwCXD4o9KZG+h9U2Ojc9j gSUz9B3CQHfZ6KuF7GilXBDRH3ZqbShGEJeiAEXBQfLm/p5m0cAQAYeX1qquDv6Y+OlQ yuCjTl1VjreylPBYtN9wnh0vt6DB9SMV/OqoU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=ve9bVjJpbvq3A7ScYz3sFbtMmcWjT48LbIDwrRSF3h6jyQm2Wx1oa05puHpPnjfIfo ZEuKkpr/lN+DjOrMpND1LD47uiWsl+m5wQLxro+9khwe13QHqwDv5ZPjWsMkIdjMOS/x zDgvwZR0oTqq3X82kTE2dmQIPmcsthVJOalIY= Received: by 10.115.144.3 with SMTP id w3mr7568991wan.7.1277821043802; Tue, 29 Jun 2010 07:17:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.125.2 with HTTP; Tue, 29 Jun 2010 07:17:03 -0700 (PDT) In-Reply-To: References: <454008.53442.qm@web31810.mail.mud.yahoo.com> From: Luke Driscoll Date: Tue, 29 Jun 2010 10:17:03 -0400 Message-ID: Subject: Re: View Efficency To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016364c5fbf67329b048a2be5f7 X-Virus-Checked: Checked by ClamAV on apache.org --0016364c5fbf67329b048a2be5f7 Content-Type: text/plain; charset=ISO-8859-1 I would suggest have the ability to tie a lucene index entry to an emitted key, then when we get a match in lucene we map that to a list of emitted keys, then reduce from there. However, I think the original question from Behrad still stands, is it more efficient to emit multiple keys per document, or create multiple views? On Tue, Jun 29, 2010 at 09:54, Robert Newson wrote: > You are correct that you cannot do map/reduce with the Lucene > full-text indexing engine. People keep asking for it, but no one can > explain how it could be implemented. :) > > B. > > On Tue, Jun 29, 2010 at 2:50 PM, Luke Driscoll > wrote: > > One of the reasons that I have not been using couchdb-lucene is that it > > doesn't seem to allow us to use the reduce functionality of a view, and > that > > the results are just the documents. Am I way off in this statement? > > > > Luke > > > > On Tue, Jun 29, 2010 at 09:38, Sebastian Cohnen < > > sebastiancohnen@googlemail.com> wrote: > > > >> in that case, you want the power of a search engine like lucene/solr. > you > >> should definitely have a look at couchdb-lucene. > >> > >> You wrote in another reply: > >> > but we are querying through multiple document "keys" not key contents! > >> and we are not bios toward > >> > full-text indexers for now in this project. > >> > >> you can actually define very precisely what you want to have indexed by > >> lucene, may it be only one key, or everything down to attachments. > >> > >> > >> On 29.06.2010, at 15:10, Behrad Zari wrote: > >> > >> > It's AND-logic. I read my post again and found that I've written "OR" > >> > mistakenly. > >> > > >> > Actually talking, we are gonna filter results that are starting with > >> > key[i]=val[i] AND starting with key[j]=val[j] > >> > (our searches use startkey and endkey to filter doc ranges) > >> > So, we may emit compound/array keys: [key1, ...] to simulate > AND-logic. > >> > > >> > I get your idea Sebastian, but CouchDB is preferred to do the actual > >> filtering > >> > (unity of all _byKey view results) since each of returned rows from > the > >> server > >> > may contain huge number of results! and this is not an efficient > solution > >> > instead of a MAY-BE-EXISTING serverside solution. (based on B+trees) > >> > > >> > --Behrad > >> > > >> > > >> > >> > > > --0016364c5fbf67329b048a2be5f7--