Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MySQL MATCH query for part words

Posted on 2010-11-17
3
Medium Priority
?
476 Views
Last Modified: 2012-05-10
Hi team,

I am trying to find all the records which include the word intervention or an extension thereon.

SELECT
provider1_providers.provider_name,
provider1_providers.`profile`,
provider1_providers.services_information,
provider1_providers.other_information
FROM
provider1_providers
where
MATCH(other_information) AGAINST('Intervention' WITH QUERY EXPANSION)

I have a Fulltext index set and all records with 'Intervention' appear, but records with 'Interventions' do not appear.

What do I need to add for this?

All help is appreciated
Cheers Bernard
0
Comment
Question by:BernardGBailey
3 Comments
 
LVL 3

Expert Comment

by:boraganesh
ID: 34161474
pls try following
SELECT
provider1_providers.provider_name,
provider1_providers.`profile`,
provider1_providers.services_information,
provider1_providers.other_information
FROM
provider1_providers
where
other_information like %Intervention%

Open in new window

0
 
LVL 4

Accepted Solution

by:
Romi Kuntsman earned 2000 total points
ID: 34161897
"LIKE" doesn't use FullText indexing.
You need to use Match as you do.
http://dev.mysql.com/doc/refman/5.1/en/fulltext-search.html

But you need Boolean search, not Query Expansion
http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html

So try:
MATCH(other_information) AGAINST('Intervention*' IN BOOLEAN MODE)
0
 

Author Closing Comment

by:BernardGBailey
ID: 34162503
Thanks for the heads up
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
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

916 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