MySQL Forums
Forum List  »  Full-Text Search

Re: MATCH Keywords with Spaces AGAINST Large Text
Posted by: Peter Brawley
Date: December 06, 2021 12:30PM


the fastest way to do this would be to use MATCH AGAINST. Note the sit_keyword table has a FULLTEXT index.


sit_keyword sk
MATCH(sk.keyword) AGAINST (@large_resume_text);

Problem is, that reverses Match ... Against logic, which is that Match arguments specify text to be searched, and Against arguments specify items to search for.

Without that reversal, matching whole phrases by double-quoting them works as documented.

Unfortunately, to Match Against a table of keywords in MySQL seems to require a cursor, which will be painfully slow.

An alternative would be to assemble a Union query in an API language like PHP.

Edited 2 time(s). Last edit at 12/06/2021 01:05PM by Peter Brawley.

Options: ReplyQuote

Written By
Re: MATCH Keywords with Spaces AGAINST Large Text
December 06, 2021 12:30PM

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.