Reverse Search Best Practices?

Posted by edub on Stack Overflow See other posts from Stack Overflow or by edub
Published on 2010-03-12T08:07:14Z Indexed on 2010/03/12 8:07 UTC
Read the original article Hit count: 142

Filed under:
|
|
|
|

I'm making an app that has a need for reverse searches. By this, I mean that users of the app will enter search parameters and save them; then, when any new objects get entered onto the system, if they match the existing search parameters that a user has saved, a notification will be sent, etc.

I am having a hard time finding solutions for this type of problem.

I am using Django and thinking of building the searches and pickling them using Q objects as outlined here: http://www.djangozen.com/blog/the-power-of-q

The way I see it, when a new object is entered into the database, I will have to load every single saved query from the db and somehow run it against this one new object to see if it would match that search query... This doesn't seem ideal - has anyone tackled such a problem before?

© Stack Overflow or respective owner

Related posts about django

Related posts about python