Thanks a lot for your replies.

So, if I understand correctly from the last two posts, the suggestion
would be to keep the tags but to store them in a full-text-index
engine so that the queries will be more efficient.
In that case I have a few more questions:
would that approach help protecting from spelling mistakes?
will methods of django-tagging (like the one used for retrieving
related objects based on shared tags) have to be reimplemented with
the syntax of the search engine?
and last, if I have two fields to be indexed by the search engine (say
"tags" and "description"), can I specify to give more importance (or a
higher weight) to the tags field than to the description field when
calculating the scores?

Thanks again
Francesco

On May 2, 6:30 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On 2 май, 05:40, Eric <[EMAIL PROTECTED]> wrote:
>
>
>
> > 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.
>
> If we talk about possible SQL solution to solve such task, then I
> would suggest storing tags in a full-text-index.
>
> That way you will be able to select them all, with relevance scores,
> via single SQL query without
> joins.
>
> We are using this version of text 
> search:http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/
>
> Alex
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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