Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 7743 invoked from network); 10 Feb 2009 22:38:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Feb 2009 22:38:02 -0000 Received: (qmail 47077 invoked by uid 500); 10 Feb 2009 22:37:59 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 47046 invoked by uid 500); 10 Feb 2009 22:37:59 -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 47035 invoked by uid 99); 10 Feb 2009 22:37:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Feb 2009 14:37:59 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.221.21 as permitted sender) Received: from [209.85.221.21] (HELO mail-qy0-f21.google.com) (209.85.221.21) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Feb 2009 22:37:51 +0000 Received: by qyk14 with SMTP id 14so347850qyk.11 for ; Tue, 10 Feb 2009 14:37:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=sadZ2fKnUg7G36BRZvSu0Xnwnt4RIj++qAjKjkR/JA4=; b=sjF57v1vyvy52f+InnVZyJcudksDf9aEvTNcKUKClBSqP1mIF7ylzNcGhBE1jmginJ YwawXaRydJDr6wispsHT/X0CqMcAzcL01XWWXXJRDHfsSbrK8xRgQq8Qd03dX/yRLzu3 tpQUlaQltDONTvUSsbNm282ZyWwolbQN8swYU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=S8TyLldofMBELJVVMeT4PlMCx/J1Bh0B0Dweiw29WNcrU1SUxM5vTfoM2ir7WE54EZ k2+cYFD1j0u6NkQYHz3MINnmleQkt47GkOfVpjh92Z39omehi7wYkqauMmkbp3bbmYyI 0gvlMX9xpuYyE9gotzE0gdC1Bx7H6NManKMXI= MIME-Version: 1.0 Received: by 10.231.19.70 with SMTP id z6mr909868iba.29.1234305450165; Tue, 10 Feb 2009 14:37:30 -0800 (PST) In-Reply-To: References: Date: Tue, 10 Feb 2009 17:37:30 -0500 Message-ID: Subject: Re: A permanent view for user-entered query with complex boolean expressions? From: Paul Davis To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Feb 10, 2009 at 5:16 PM, Barry Wark wrote: > Paul, > > Thanks for the very interesting response. CouchDB is looking like a > huge win for us in the long run. A couple of quick follow ups inline > below... > [snip] >> Now that we know the relative number of docids we can start searching >> for the result set by applying each boolean clause using set math. We >> just apply from the smallest number of docids to the largest to try >> and make sure we keep resource usage to a minimum. > > This seems like a very common pattern. Is there any chance of getting > it implemented in CouchDB? > There's definitely a chance. No idea how soon or in what exact nature the feature would end up looking like but I've found the CouchDB community very accepting of patches for new features. I'm pretty interested in such a feature myself and I'll be posting a summary email of my thoughts shortly for discussion on what people would find most beneficial as well as finding if there are any flaws in my logic etc. >> >> At the moment, that's the pure CouchDB way. In real life for your >> query interface I'd most likely write a small slave process that uses >> the _external interface. Hopefully in the next months a couple feature >> ideas I have rattling around will coalesce into an implementation that >> will make things like this easier from directly within CouchDB. But >> for right now, that's all hand waving. > > I'm not familiar with the _external interface yet. Is there some > documentation? Is this how the lucene index that Robert mentions > works? > > User-specifiable queries like this is going to be a critical feature > for us, whether we go with CouchDB or not, so I'm very interested in > keeping up with related developments. Feel free to contact me offline > if you're interested in more specific use cases etc. > > Thanks again, > Barry > The current _external interface documentation can be found at [1]. Its basically just a thin wrapper around the HTTP request and response to allow for custom code to be run behind CouchDB. The easiest way to keep up is by following the dev list. I'd definitely recommend it if you're interested in testing features as they land. [1] http://wiki.apache.org/couchdb/ExternalProcesses HTH, Paul Davis