fulltext search on derived tables
I might have asked this before (if I did I can't find it) but is there a way to use fulltext search on a derived table or a better way to write the following query:
Code MySQL:
SELECT DISTINCT dvdpedia.id, dvdpedia.title, dvdpedia.locale, dvdpedia.localeLanguage, dvdpedia.originalTitle, media.media
, a.actor
, d.director
FROM dvdpedia
LEFT OUTER JOIN ( SELECT director2title.titleId,
GROUP_CONCAT(director SEPARATOR ', ') AS director
FROM director
INNER JOIN director2title
ON director.id = director2title.pid
GROUP BY director2title.titleId ) AS d
ON d.titleId = dvdpedia.id
LEFT OUTER JOIN actor2role ON actor2role.titleId = dvdpedia.id
LEFT OUTER JOIN media ON media.id = dvdpedia.mediaId
INNER JOIN (SELECT actor.id,
GROUP_CONCAT(actor SEPARATOR ', ') AS actor
FROM actor
INNER JOIN actor2role
ON actor.id = actor2role.actorId
GROUP BY actor.id) AS a
ON a.id = actor2role.actorId
WHERE MATCH(dvdpedia.title) AGAINST("pirates" IN BOOLEAN MODE)
OR MATCH(a.actor) AGAINST("pirates" IN BOOLEAN MODE)
OR MATCH(d.director) AGAINST("pirates" IN BOOLEAN MODE)
GROUP BY dvdpedia.title
Basically I need to do a keyword search, hence the ORs there. I don't know if the search will be for title or actor or director. So I'm joining the tables, but mysql complains that a.actor does not support fulltext indexes. If I put the matches inside the SELECT statements where I get the actor and director it won't be an OR operation and will immediately fail if it doesn't find a match.
Any ideas?