Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 26582 invoked from network); 6 Jan 2010 18:10:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Jan 2010 18:10:55 -0000 Received: (qmail 45585 invoked by uid 500); 6 Jan 2010 18:10:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 45510 invoked by uid 500); 6 Jan 2010 18:10:54 -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 45500 invoked by uid 99); 6 Jan 2010 18:10:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jan 2010 18:10:54 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nicpottier@gmail.com designates 209.85.160.56 as permitted sender) Received: from [209.85.160.56] (HELO mail-pw0-f56.google.com) (209.85.160.56) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jan 2010 18:10:47 +0000 Received: by pwi19 with SMTP id 19so12299414pwi.35 for ; Wed, 06 Jan 2010 10:10:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=7f8Vxc6cbWb2FtT+TXU7pIc/yt2HRjJAR5kQ/6eZvSE=; b=KoFm+22sA2O7ywG0Zlh6z7mHsJ3/MBX36R7cT/rh14sTXaNQ7LEIo13C51VwfN0LO3 J7hka/rNMGIUbheEE+pwJ20Qs6lRAbbId5O6eKzqyXn6jH1iZExl6e8NZ5GY5f/R6ZKr PExVzRl8rrhaykOfNFt4QNXykk3MgjNnY24PY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=TO/zYakDCncZ4Gcu7Hb4zxQdSzlaNxrPba9WY0656SQqB/1W1iQNsI3C0zqfwc08qk n7jWxC+oeRLvd+J9745NAs8BlcFDYLiRpRoiS9qSrOsoN/GNFocOPvM/NuEfxE29QFhy 1RtK5nEN7sdubZDU4cPRLYSAMTphAF1uB+jLc= MIME-Version: 1.0 Received: by 10.115.114.18 with SMTP id r18mr1346453wam.24.1262801427136; Wed, 06 Jan 2010 10:10:27 -0800 (PST) Date: Wed, 6 Jan 2010 10:10:27 -0800 Message-ID: Subject: Building IFI View for Text Queries From: Nic Pottier To: user Content-Type: text/plain; charset=ISO-8859-1 Howdy All, New user playing with CouchDB to evaluate whether it will work for our needs. I have a good bit of experience with standard SQL and recently with Amazon's SimpleDB, but I'll admit my brain is stretching a bit to get the 'couch db' way of doing things. Anyways, in my particular case, I have a set of records, let's say they are websites, which have an id of their URL, and various attributes, including the 'title' of the URL. I want the ability to be able to find all sites which contain a particular word in their title. I know that isn't directly supported in couch-db, and that there is a Lucene 'add on', but I'd rather avoid that if possible. What I have tried is to create a view that is built by doing basic tokenization of the titles, emitting each individual word in lowercase with a null value. Once created this acts as an inverted file index, allowing me to find all the documents that contain a particular word etc.. And it seems to work ok, it is fast, and updating documents seems reasonably fast as well. I can also do 'OR' queries using the keys POST call on the view, which satisfies my requirements perfectly. What's the catch? Is this ok to do? Any gotchas I should be aware of? Thanks, -Nic