I have 2 mysql fulltext search queries that return a different set of results.
SELECT e.id AS e__id,
MATCH(e.subtitle, e.summary, e.title, e.prtext) AGAINST ('lorem')
FROM exhibitions e
will return a predictable set of 7 rows (I have 10 overall in the table), each having the id of a record that contains the word ‘lorem’.
However, when I introduce a where clause
SELECT e.id
FROM exhibitions e
WHERE MATCH(e.subtitle, e.summary, e.title, e.prtext) AGAINST ('lorem')
No rows are returned.
What is the difference between these two queries?
Actually, the issue was I had a number of fulltext indicies on my table structure, when I really only needed one. Here is a correct query with a
whereand anandclause: