incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Antivackis <patrick.antivac...@gmail.com>
Subject Re: playing with tags
Date Thu, 12 Feb 2009 16:07:33 GMT
> but now, I want all articles wich are tagged with "couchdb" *and* "python"
> (I want the article1). Is there a method to do it directly with CouchDB
views ?
> Something like that :

The only way to do that is to emit all the possible tags combinations for an
article.
In order to decrease the number of combinations, you first order them by
alphabetical order, then you emit them.

For the query, you will order alphabetically the tags you are looking for
and then use a starkey/endkey view retrieval.



2009/2/12 Kerr Rainey <kerr.rainey@gmail.com>

> 2009/2/12 Dean Landolt <dean@deanlandolt.com>:
> > This is an issue that has been nagging at me lately. Storing tags in the
> doc
> > seems like a recipe for disaster (that is, if you consider view
> contention
> > disaster). I would argue that tags (and other readily changeable
> > user-specific state information like read/unread, favorite, blah blah)
> > should be kept in separate docs and bridged together in views.
>
> Erm... why do think tags for a blog post would be rapidly changing?
> They would be set by the owner of a post and that's it.  The
> likelihood of a tag changing in this scenario is no greater than the
> post being edited.  It's meta info, but clearly part of the post.  You
> won't have many people try to update the same post, or at least the
> contention on that is very low.
>
> --
> Kerr
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message