You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Karl Wettin <ka...@gmail.com> on 2007/09/17 22:32:52 UTC
UserTagDesign
I've been looking at <http://wiki.apache.org/solr/UserTagDesign> on
and off for a while and think all the use cases could be explained
with simple UML class diagram semantics:
> [Taggable](tag:Tag)-- {0..*} ----|--- {0..*} --(tag:Tag)[Tagger]
>
> |
> [Tagging]
Rendered: <http://ginandtonique.org/~kalle/tagging.pdf>
This is of course a design that might not fit everybody, it could be
represented using an n-ary association or what not. But I find the
text on the wiki much easier to follow with this in my head.
How (or even if) one would represent this in a index is a completely
different story.
Translated to Java the diagram would look something like this:
> /** the user */
> class Tagger {
> Map<Tag, Set<Tagging>> taggingsByTag;
> }
>
> /** the content */
> class Taggable {
> Map<Tag, Set <Tagging>> taggingsByTag;
> }
>
> /** content tagging */
> class Tagging {
> Tagger tagger;
> Taggable tagged;
> Date created;
> }
>
> class Tag {
> String text;
> }
Thought it was better to let you people decide whether or not this
fits in the wiki.
--
karl