MySQL Forums
Forum List  »  Full-Text Search

Full Text Search: passing a column to AGAINST
Posted by: Mike Lively
Date: February 22, 2005 01:37PM

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
http://dev.mysql.com/tech-resources/articles/full-text-revealed.html

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.)

Options: ReplyQuote


Subject
Views
Written By
Posted
Full Text Search: passing a column to AGAINST
3796
February 22, 2005 01:37PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.