zaggs — 2012-04-04T09:04:44-04:00 — #1
I have a search function on my website and I need to do a boolean search on a fulltext index.
For example, currently I am doing this:
match jobs.job_title against ('developer')
This works absolutely fine. However, I also have a function where the user can enter negative keywords. If they enter negative keywords, for example, "php" then results containing "php" will not be returned.
I thought of adding some extra sql like this, but is this the correct way to do things?
and (jobs.job_title not like '%php%'
and jobs.job_description not like '%php%'
and companies.company_name not like '%php%')
Thanks in advance.
r937 — 2012-04-04T10:43:08-04:00 — #2
what happened when you tested it?
zaggs — 2012-04-04T10:45:36-04:00 — #3
It worked. I just wondered if there would be a discrepancy between the MATCH and NOT LIKE stataments...
mittineague — 2014-09-23T19:16:43-04:00 — #4
This topic is now archived. It is frozen and cannot be changed in any way.