Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[Full Text Search] Passing column to AGAINST()

Status
Not open for further replies.

mjlivelyjr

Programmer
Feb 22, 2005
1
US
Is there a way in any version of MySQL to pass a column name to AGAINST when doing a full text search.

I know the manual says no, but then this article says yes, sorta. Though I believe it may only be applicable to MySQL 5.x

An example of the query that I would like to use is somewhat similar to this (shortened to save time):

SELECT * FROM resumes, alerts
WHERE resumes.resume_id = 1 AND alerts.type = 'resume'
AND MATCH (resumes.content) AGAINST (alerts.keywords)

The purpose of this is to implement an alert system. The site has basic search functionality for resumes, however if a search doesn't yield resumes a user also has the option to save the search and be automatically alerted when a new resume is added to the DB that matches the search. The way to do this that made most sense to me is to just check all the saved searches (alerts) after a resume is added. Part of the standard search however involves a full text search over the body of the resume, which is of course a piece of cake when matching resumes to a given search, however when I work it the other way around (matching alerts to a given resume) it's not so easy as I don't have a static string to use in AGAINST(). So is there way around this and if not is there any other way to do this that doesn't checking each and every alert individually? (The system could easily get into the hundreds of thousands of alerts eventually.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top