﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on RavenDB and complex tagging</title><description>John,
You already have the list of tags, just count them.</description><link>http://ayende.com/156770/ravendb-and-complex-tagging#comment13</link><guid>http://ayende.com/156770/ravendb-and-complex-tagging#comment13</guid><pubDate>Sat, 07 Jul 2012 23:17:37 GMT</pubDate></item><item><title>John commented on RavenDB and complex tagging</title><description>Is it also possible to return the count of matching tags from the index?</description><link>http://ayende.com/156770/ravendb-and-complex-tagging#comment12</link><guid>http://ayende.com/156770/ravendb-and-complex-tagging#comment12</guid><pubDate>Sat, 07 Jul 2012 21:45:23 GMT</pubDate></item><item><title>Daniel Lang commented on RavenDB and complex tagging</title><description>I would denormalize the label here as well. A tags label is something that almost never changes and when it does, it is ok to have a batch operation that goes through all the albums and updates the label accordingly.</description><link>http://ayende.com/156770/ravendb-and-complex-tagging#comment11</link><guid>http://ayende.com/156770/ravendb-and-complex-tagging#comment11</guid><pubDate>Sat, 07 Jul 2012 17:32:38 GMT</pubDate></item><item><title>Ayende Rahien commented on RavenDB and complex tagging</title><description>Chanan,
For example, it might have fields like: "Name", "Description", "IsAdult", etc.
Users might want to follow a tag, and you want to track how many are doing so.
It is an actual entity in the system</description><link>http://ayende.com/156770/ravendb-and-complex-tagging#comment10</link><guid>http://ayende.com/156770/ravendb-and-complex-tagging#comment10</guid><pubDate>Thu, 05 Jul 2012 13:50:16 GMT</pubDate></item><item><title>Chanan Braunstein commented on RavenDB and complex tagging</title><description>In this scheme, what is in the Tag document? Does it have a "purpose" here? Why not just store the tag name in the album instead of the id and remove the need for the tag document? I am guessing it has something to do with the first requirement, but I am not getting it.</description><link>http://ayende.com/156770/ravendb-and-complex-tagging#comment9</link><guid>http://ayende.com/156770/ravendb-and-complex-tagging#comment9</guid><pubDate>Thu, 05 Jul 2012 13:28:15 GMT</pubDate></item><item><title>Rafal commented on RavenDB and complex tagging</title><description>That's nice - I thought the include function works only for single doc references.</description><link>http://ayende.com/156770/ravendb-and-complex-tagging#comment8</link><guid>http://ayende.com/156770/ravendb-and-complex-tagging#comment8</guid><pubDate>Thu, 05 Jul 2012 09:51:12 GMT</pubDate></item><item><title>Ayende Rahien commented on RavenDB and complex tagging</title><description>Rafal,
I won't have to do ANY join/distinct operation. Those are relational concepts. I can _include_ the related docs, and that is a cheap operation</description><link>http://ayende.com/156770/ravendb-and-complex-tagging#comment7</link><guid>http://ayende.com/156770/ravendb-and-complex-tagging#comment7</guid><pubDate>Thu, 05 Jul 2012 08:29:07 GMT</pubDate></item><item><title>Rafal commented on RavenDB and complex tagging</title><description>But with such design you have to perform a join/distinct operation to display tags for an album. Imho it would be better to modify the structure of the document like:

Tags: [
{ Id: 'tags/1', Name: 'Tag 1', Tagged: [{By: 'user/1', When: '2010-01-01'}, ...]},
(... and so on)
]
</description><link>http://ayende.com/156770/ravendb-and-complex-tagging#comment6</link><guid>http://ayende.com/156770/ravendb-and-complex-tagging#comment6</guid><pubDate>Thu, 05 Jul 2012 08:04:13 GMT</pubDate></item><item><title>Ayende Rahien commented on RavenDB and complex tagging</title><description>alexidsa,
That is a reference to another document, not an internal id.</description><link>http://ayende.com/156770/ravendb-and-complex-tagging#comment5</link><guid>http://ayende.com/156770/ravendb-and-complex-tagging#comment5</guid><pubDate>Wed, 04 Jul 2012 23:08:31 GMT</pubDate></item><item><title>ccollie commented on RavenDB and complex tagging</title><description>@henry - definitely a consideration. In my case, i don't anticipate there being more than 5 per document.

But you are correct in that this can drive the decision of how documents are structured. For instance, i have a few document types which can be voted on, and there is a much higher probability that the number of votes could exceed the amount i'd like to keep in a single document. So voting information is split into a separate document.</description><link>http://ayende.com/156770/ravendb-and-complex-tagging#comment4</link><guid>http://ayende.com/156770/ravendb-and-complex-tagging#comment4</guid><pubDate>Wed, 04 Jul 2012 15:39:54 GMT</pubDate></item><item><title>ccollie commented on RavenDB and complex tagging</title><description>@alexidsa - the reason ids are needed is that tag names can be ambiguous. If i add the tag "rock", am i talking about geology or music. Imagine you're a newspaper, with multiple sections (music, outdoors, etc). Searching for "rock" without context can return incorrect results.

The ids in my case point to a Term which has a name, like "rock", but also a Vocabulary ("sports", "entertainment", or whatever) which helps to provide context and disambiguate the tag name.</description><link>http://ayende.com/156770/ravendb-and-complex-tagging#comment3</link><guid>http://ayende.com/156770/ravendb-and-complex-tagging#comment3</guid><pubDate>Wed, 04 Jul 2012 15:35:49 GMT</pubDate></item><item><title>henry commented on RavenDB and complex tagging</title><description>What if 5000 users add 5 tags to a single doc. Isn't the album doc becoming pretty large (and slow to load/deserialize) with a Tags array of 25000 items then?</description><link>http://ayende.com/156770/ravendb-and-complex-tagging#comment2</link><guid>http://ayende.com/156770/ravendb-and-complex-tagging#comment2</guid><pubDate>Wed, 04 Jul 2012 14:27:02 GMT</pubDate></item><item><title>alexidsa commented on RavenDB and complex tagging</title><description>I thought you don't like when document child elements have ids...</description><link>http://ayende.com/156770/ravendb-and-complex-tagging#comment1</link><guid>http://ayende.com/156770/ravendb-and-complex-tagging#comment1</guid><pubDate>Wed, 04 Jul 2012 09:38:24 GMT</pubDate></item></channel></rss>