MySQL Forums
Forum List  »  Full-Text Search

Re: fulltext indexes aren't working with nested queries
Posted by: Rick James
Date: August 31, 2012 05:58PM

I wanted you to run the "EXPLAIN" command.

Anyway, I see the issue... The subquery works because the table has a FULLTEXT index. The outer query is run against a subquery: "( SELECT ... )". Subqueries have no indexes.

I don't understand what you are trying to achieve, but see if either of these helps:
SELECT  *,
        MATCH(myfield) AGAINST('key2 key1') AS test2
    FROM  mytable; 

SELECT  *,
        MATCH(myfield) AGAINST('key2') AS test2,
        MATCH(myfield) AGAINST('key1') AS test1
    FROM  mytable; 

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: fulltext indexes aren't working with nested queries
2353
August 31, 2012 05:58PM


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.