incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <>
Subject Re: Brain check on CouchDB views
Date Sun, 08 Nov 2009 03:50:45 GMT

Your thinking is spot on.

> - Display a list of documents by any user, having tag "B" AND "Y"!
> >From what I can see, this cannot be resolved with a simple CouchDB view
> (except if the condition was OR and the tags were directly adjacent in
> the sorting order, but that should be a rare coincidence). Instead, I'd
> have to use an external search index like Lucene and perform my search
> queries on that instead.
> Does all this sound about right? Are there even simpler ways to go about
> the by_user/global_tags features, like using only one view instead of
> two separate ones (I've tried, but didn't succeed)?

The short answer is no. The long answer is probably not unless you
know which tags you want in the OR beforehand when you build the view.
The only other way is to use an external indexer.

The reasoning is that boolean logic like this is gonna require
multiple index traversals which CouchDB doesn't allow. As such, the
best answer is either do the logic client side with some effort, or
use an external indexer like couchdb-lucene.

Paul Davis

View raw message