storing custom filters in db
Posted: Tue May 26, 2009 2:05 am
I'm looking at implementing ideas mentioned in this thread: viewtopic.php?f=19&t=94751&st=0&sk=t&sd=a
Basically I want a tag-based forum that allows users to select criteria that the system uses to automatically sort threads into user-defined categories. I'm wondering how to best store this in the database. For instance, lets say I want all threads tagged with tag 'data mapper' in which the original poster has more than 50 posts. I could easily write a query like this, but I need the system to be able to automatically parse threads based on the above criteria.
Considering the most common query would be to retrieve threads that meet a certain group of filters, I'm thinking of maybe having a table for the groups of categories, and attaching this group to a thread when it meets all criteria. That would allow for the quickest read times. However, what I'm most worried about is the time it takes to run all of the filters, since they're all user-defined. It seems like a aystem like this could drag a server down pretty quickly if not done right.
Any suggestions would be very much appreciated.
Basically I want a tag-based forum that allows users to select criteria that the system uses to automatically sort threads into user-defined categories. I'm wondering how to best store this in the database. For instance, lets say I want all threads tagged with tag 'data mapper' in which the original poster has more than 50 posts. I could easily write a query like this, but I need the system to be able to automatically parse threads based on the above criteria.
Considering the most common query would be to retrieve threads that meet a certain group of filters, I'm thinking of maybe having a table for the groups of categories, and attaching this group to a thread when it meets all criteria. That would allow for the quickest read times. However, what I'm most worried about is the time it takes to run all of the filters, since they're all user-defined. It seems like a aystem like this could drag a server down pretty quickly if not done right.
Any suggestions would be very much appreciated.