Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 52991 invoked from network); 10 Feb 2011 23:14:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Feb 2011 23:14:16 -0000 Received: (qmail 81490 invoked by uid 500); 10 Feb 2011 23:14:15 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 81426 invoked by uid 500); 10 Feb 2011 23:14:14 -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 81417 invoked by uid 99); 10 Feb 2011 23:14:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Feb 2011 23:14:14 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robert.newson@gmail.com designates 209.85.214.52 as permitted sender) Received: from [209.85.214.52] (HELO mail-bw0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Feb 2011 23:14:09 +0000 Received: by bwz4 with SMTP id 4so2487073bwz.11 for ; Thu, 10 Feb 2011 15:13:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=tVRroS06cjciautvPreYWuHhvey/FKPC9AzPzXCdvqY=; b=Y+VY4z1zbLjakfmwNDvFVqBAoA5wScMi5iq0jwd5g276uAWj7TzalJpBPs9sQ5RyLW 1Bq93B9mgfUphahmMS74G9FxBqR88eyCKIkvMHiui89OByLp+W2GwuqPy+PdwOa7QqZx caqRiJkcgtdyt+rJwgmV1Gt9hgJmOmmctoyJ8= 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; b=ZLZDTuHzms9eN5JgaJUd80hRtpbZhKKpUhvWmCRexkqlgx17t9In/VnYEPPqFvX8Qk ktmiEI0WizqQDyd/TAQI2ZNhIjiYgPZHXhhhq04lVjr8ZzT3qhjrV2PTFcr3WOBY2YDP d1ZDctWm/7sFfbXJQhuTkIAPBfn8IsOEgwVzY= MIME-Version: 1.0 Received: by 10.204.100.136 with SMTP id y8mr11879621bkn.171.1297379628206; Thu, 10 Feb 2011 15:13:48 -0800 (PST) Received: by 10.204.113.146 with HTTP; Thu, 10 Feb 2011 15:13:48 -0800 (PST) In-Reply-To: References: Date: Thu, 10 Feb 2011 23:13:48 +0000 Message-ID: Subject: Re: CouchDB and tags From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Aha, yes, subtle. "A" is a "stop word". A word deemed so common that it's stripped while indexing. add "analyzer":"keyword" at the same level as "index". B. On 10 February 2011 22:47, Amedeo Paglione wrote: > Thanks for the suggestion. The solution was based not considering other > indexing server other than the standard view, but I got curious to see the > integration with lucene, considering also that a full-text index can be > really helpful. > > Configuring couchdb-lucene was quite simple, but I got unexpected results on > some of the queries. > > I have documented it in this gist: > > https://gist.github.com/fe0fcf29cb38e7df23d1 > > Is the function described the best way to index an array of tags? > > Thanks, > -- > Amedeo > > > > > On Thu, Feb 10, 2011 at 17:11, Robert Newson wrote: > >> couchdb-lucene is an alternative to the combinatorial explosion approach; >> >> https://github.com/rnewson/couchdb-lucene >> >> B. >> >> On 10 February 2011 15:57, Zachary Zolton >> wrote: >> > Amedeo, >> > >> > If you can afford the disk space, it's a fair tradeoff. I've used a >> > similar strategy in the past, and it worked out well for me. >> > >> > You may want to consider limiting the maximum size of tag combinations >> > to index. For example, I changed my view to emit tag combination >> > arrays with no more than 4 elements. This could significantly reduced >> > the index size if your documents have many tags. >> > >> > >> > Cheers, >> > >> > Zach >> > >> > >> > On Thu, Feb 10, 2011 at 9:29 AM, Amedeo Paglione >> > wrote: >> >> Hi all, >> >> >> >> I have been playing with CouchDB for a while and I had to address the >> >> problem of retrieving documents which match a list of tags. >> >> >> >> I have documented my approach here: >> >> >> >> https://gist.github.com/820412 >> >> >> >> It is working, but I am wondering what could be an alternative and more >> >> efficient solution to this problem. >> >> >> >> Regards, >> >> -- >> >> Amedeo >> >> >> > >> >