Tag Filters (Update on Query Problems)

From the couple responses I got to my posting about Query Problems it looks like there is no great solution to tag filtering. It does look like using a subquery for each tag you want to filter by works reasonable well up to at least hundreds of thousands of tags, so that approach should work just fine for me.

The actual filtering is in my AJAX resources, and is currently just on there attributes (language they are written in, etc) not resources other tags. I think to really make the filtering work nice i’ll use some sort of multi link approach were you can add the filter as an or link, as an and, or view view that tag. I’ve also been thinking about adding some AJAX to the page just to show it off, but I’m not sure its really helpful to usability besides possible faster loads times, I’ll have to think about it a little more.

An example of why the filtering was added is now you can see all the PHP AJAX libraries, where before all the Ruby or Perl ones would be mixed in.

2 thoughts on “Tag Filters (Update on Query Problems)”

  1. I just wanted to follow up a bit. First, definitely read the discussion that someone else pointed to on your previous post (http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html). One thing it motivated me to do was dig into the other options of MySQL’s fulltext searching. I obviously had read the docs very carefully because I totally missed the boolean search options (http://dev.mysql.com/doc/mysql/en/fulltext-boolean.html). Now that I know these options exist, I’m going to give fulltext searching another try as the performance problems of subqueries are starting to get me down.

  2. I did read through that link, and for my normal cases i could just use the having count(numberoftags) bit to get rid of the subqueries, this leaves using subqueries for the not a tag cases, but since my db size is so small im just going to stick with subqueries for everything and not worry about it :-).

    Plus with the layout I could put more data on my tags if I ever wanted.

Comments are closed.