zenguru
asked on
MySQL Full Text Search questions
I have a simple table in database called devtop with sample rows like:
id keyphrase score
34 popular nursing schools q2
35 career paths in psychology q7
where id is the primary key.
(1)
I want to make keyphrase column as Full Text Search index type. I could not find in the MySQL Admin GUI application how to do that. Can you provide SQL for that ? I was able to convert from InnoDb to MyISAM which is required for Full Text Search indexing.
(2)
It says Full Text Search will ignore words shorter than 4 characters by default. But I need to search based on 3 characters words also. How to change this default?
(3)
Supposed I need to search for 'nurse' ( returning rows that has the keyword nurse in the column keyphrase. Will this return row number 34? I mean is it smart enough to know that 'nursing' also matches 'nurse'.
(4)
What about matching synonyms? Will search for keyword ' famous' return row 34? As famous is synonym for popular.
Question number 5 is optional but would appreciate if you have Hibernate experience.
(5) What is the Hibernate HQL query to search for keyword 'nurse' in the column 'keyphrase' based on Full Text Search. In Raw SQL for MYSQL I will use Match Against construct in the SQL. What is the Hibernate HQL or Hibernate Criteria query equivalent for this?
id keyphrase score
34 popular nursing schools q2
35 career paths in psychology q7
where id is the primary key.
(1)
I want to make keyphrase column as Full Text Search index type. I could not find in the MySQL Admin GUI application how to do that. Can you provide SQL for that ? I was able to convert from InnoDb to MyISAM which is required for Full Text Search indexing.
(2)
It says Full Text Search will ignore words shorter than 4 characters by default. But I need to search based on 3 characters words also. How to change this default?
(3)
Supposed I need to search for 'nurse' ( returning rows that has the keyword nurse in the column keyphrase. Will this return row number 34? I mean is it smart enough to know that 'nursing' also matches 'nurse'.
(4)
What about matching synonyms? Will search for keyword ' famous' return row 34? As famous is synonym for popular.
Question number 5 is optional but would appreciate if you have Hibernate experience.
(5) What is the Hibernate HQL query to search for keyword 'nurse' in the column 'keyphrase' based on Full Text Search. In Raw SQL for MYSQL I will use Match Against construct in the SQL. What is the Hibernate HQL or Hibernate Criteria query equivalent for this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.