Gossamer Forum
Home : Products : DBMan : Customization :

Search Agents

Quote Reply
Search Agents
Good Morning Carol...
Do you know anything about "Search Agents" and how they work?...I've checked a few on different sites...
once registered, you can register a couple of key words as search criteria, and I guess the system scans all new enteries for indicate key words and if matched, sents a email indentifing the new record.....I would love to add this feature to dbman, but I'm not sure how to get started....any ideas???..Rob


Quote Reply
Re: Search Agents In reply to
Most sites use separate databases to store search preferences and key off the username or primary key (db_key) in the user database. Keep in mind that most sites that use search agents use true relational database systems (e.g., Access, Oracle, SQL, etc.).

You could use Carol's Relational Mod to create a "search agents" database that stores the search preferences and use the userid field to key off the .pass file. Another method would be to use cookies to store search preferences in end user's computers. Of course, the disadvantage of doing this is that not all users have cookies enabled. Databases are better since they could login and access their search agents from any computer.

I am actually writing a script for Links SQL that will store up to six search preferences. Pretty easy since all it does is queries the Users and Search Agent table for the userid and then through conditional statements either shows a link to add new search agents or buttons to delete, edit, and view the search agent.

One thing to keep in mind is that the search preferences will be dependent on parameters that are passed to the search query. So, if you add additional paramaters to your query string, you will have to edit the search agent hack to make it work properly. I am using a limited number of search options in my search agent table to keep it easy to use and administrate.

Also, you might want to consider using a separate .cgi script than the db.cgi to make processing more efficient. All you would have to do is add require statements and copy some of the subs (add_record, modify_record, and delete_record) in the db.cgi script.

Good luck.

Regards,

Eliot

Quote Reply
Re: Search Agents In reply to
Thanks Eliot for the valued lenghty reply.....
I quess I'm trying to get a grasp on just how a Search Agent might technically operate...
step one would be to setup a database were users can establish their keyword criteria...
step two would require some script at the end of the sub add_record in db.cgi to open and cross reference all keyword criteria against newly submitted record, then send email if matched. Is this basically how they work???
thanks Rob

Quote Reply
Re: Search Agents In reply to
In Reply To:
step one would be to setup a database were users can establish their keyword criteria...
Right...and you will have to use a field like Userid ro key off the .pass or .db files.

In Reply To:
step two would require some script at the end of the sub add_record in db.cgi to open and cross reference all keyword criteria against newly submitted record, then send email if matched.
Sort of...I would HIGHLY recommend reading the Relational Mod documentation and also the MANY Threads in this forum that discuss this modification.

Think of the "Search Agents" as relating two databases: 1) SearchAgent.db, and 2) Password File (.pass) or User File (.db} files.

Regards,

Eliot Lee