Re: MATCH Keywords with Spaces AGAINST Large Text
Hey Peter; sorry for the late response - I've had my hands full on this end.
Thanks for taking a stab at it! Unfortunately, that approach takes more than 5 seconds when my REGEXP takes around 300ms.
I'm just not sure there's any way to make this faster...
Just to refresh, I need to walk our keyword and "sit_name" database (which are words, sometimes with spaces) against a LARGE volume of text (sometimes >1000 characters).
Below is the only thing I've found to work so far...
SELECT
sm.id, sm.sit_name, sm.sit_type_c
FROM
sit_main sm
WHERE
var_text REGEXP CONCAT('\\b',sm.sit_name,'\\b')
AND IF(in_sit_type_c > -1, sm.sit_type_c = in_sit_type_c, 1)
GROUP BY
sm.id
UNION
SELECT
sm.id, sm.sit_name, sm.sit_type_c
FROM
sit_keyword sk
LEFT JOIN
sit_main sm ON sk.sit_main_ref_id = sm.ID
WHERE
var_text REGEXP CONCAT('\\b',sk.keyword,'\\b')
AND IF(in_sit_type_c > -1, sm.sit_type_c = in_sit_type_c, 1)
GROUP BY
sm.id
Subject
Views
Written By
Posted
1127
December 04, 2021 12:25PM
432
December 04, 2021 08:07PM
451
December 05, 2021 11:56AM
464
December 05, 2021 12:08PM
414
December 05, 2021 03:22PM
412
December 05, 2021 07:33PM
448
December 05, 2021 07:45PM
457
December 05, 2021 08:32PM
437
December 06, 2021 12:18PM
Re: MATCH Keywords with Spaces AGAINST Large Text
391
December 22, 2021 10:59AM
323
December 22, 2021 12:30PM
467
December 06, 2021 12:30PM