[elephant-devel] How to model a tag cloud?

Aslak Gronflaten aslakg at gmail.com
Mon Apr 13 09:05:03 UTC 2009


Hi,

using elephant with a berkeley backend, how should I go about modelling tag
cloud like
functionality?

If I have a number of persistent classes, f.ex.  Things and Items and I wish
to be
able to tag each Thing and each Item with one or more tags (let's use
keywords f.ex.)

The functionality I want is to be able to efficiently:
 - retrieve all Things (or Items ) tagged with any of a given set of
tags/keyword
   as in  (give-me-all-tagged 'Thing :any-of '(:foo :bar :baz))
 - retrive all Things (or Items) tagged with all of a given set of tags, as
in
   (give-my-all-tagged 'Thing :all-of '(:foo :baz))

For now I've been using b-trees with the tags as keys and done some set
logic in code
on top of that, but not sure how that'll work with large datasets (thousands
of Things
in existence).

Any suggestions?

Regards,
   Aslak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20090413/4b8606d0/attachment.html>


More information about the elephant-devel mailing list