I was experimenting with that very thing just now.  Doing tagging in a
sql database can get pretty expensive quick.

I was experimenting with pysolr and solr.  Solr is a enterprise search
engine server .  Solr is a little more work than to get set up than us
pythonistas are used to, but it's fast.

Another project out there is GrassyKnoll, which doesn't appear to be
ready for prime time just yet, but it looks very promising since it's
in Python.

Anyhow, my idea basically this,  since tags are basically keywords
you'd assume that using a search engine would be an great way to
collect a list of content.

You can probably continue using django-tagging but use a search engine
in your views to make a list of data.

The beauty for using a search engine is you can do tag unions as easy
as tag:python OR tag:django

or a tag intercection as:
tag:python AND tag:django

and you can do:
tag:python AND tag:django AND tag:database

with a sql database in order to do that you'd have to something like
this:

SELECT * from story
inner join story2tag s2t1 on s2t1.story_id = story.id
inner join story2tag s2t2 on s2t2.story_id = story.id
inner join story2tag s2t3 on s2t3.story_id = story.id
where s2t1.tag = 'python'
and s2t2.tag = 'django'
and s2t3.tag = 'database'

Ever new tag means another join, and it get's worse and worse

A search engine is built for keyword searches,  so it's much better
suited for that kind of thing.

E.
On May 1, 6:38 pm, francesco <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'd like to have an opinion regarding two possible ways to go on the
> implementation of a set of features for my application.
>
> I'm developing a website where there are a set of products each of
> which should come with a description and a set of tags. A fundamental
> feature of such website is to give users the possibility to search for
> products by specifying a tag or a set of tags.
>
> The way I've been handling this so far is by using the django-tagging
> application but I started wondering if it really is a reasonable way
> to go.
>
> My main concerns pertain:
> 1. the efficiency of implementing what is basically the search engine
> via the tagging application
> 2. the weakness which derives from having to spell correctly a tag or
> a set of tags in order to find the right products.
>
> On the other hand the django-tagging application gives me the
> possibility of, for example, getting products which share the same
> tags and order them by number of shared tags (which is a useful
> feature when coming to finding "related products").
>
> Do you think it would be more sensible to use a search-engine like
> lucene or sphinx instead of the tagging application? Will I still
> have, in that case, the same or similar functionalities to those
> offered by the such application?
>
> Any suggestion or point of view will be very appreciated
> Francesco
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to