Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

sql to create multi column full text index (mySQL)

Posted on 2009-04-22
2
Medium Priority
?
760 Views
Last Modified: 2013-12-12
This query returns an error because a multi column full text index is needed:

select * from `organizations` where MATCH (`name`,`keywords`,`description`,`custom_keywords`,`naics_keywords`, `naics_desc`, `p_city`, `promo_text`) AGAINST ('foo bar' WITH QUERY EXPANSION)


Could you please give me the sql query I need to create a multi column full text index on the columns needed for the above query?

Thanks!
0
Comment
Question by:hankknight
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
mostart earned 2000 total points
ID: 24206633
ALTER TABLE organizations ADD FULLTEXT(`name`,`keywords`,`description`,`custom_keywords`,`naics_keywords`, `naics_desc`, `p_city`, `promo_text`);

and do not forget to drop your old fulltext index in case you do not need it any more.
0
 
LVL 8

Expert Comment

by:mostart
ID: 24206676
also think about FULLTEXT INDEX is only working with myIsam storage engine.
check this for details:
http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month20 days, 21 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question