Solved

MySQL MATCH query for part words

Posted on 2010-11-17
3
428 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 500 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Substring() and LEFT() syntax 4 21
Remove alpha from alphanumeric 4 58
poor performance from  MySQL stored procedure 6 23
mcrypt_create_iv() is deprecated 4 67
I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
Creating and Managing Databases with phpMyAdmin in cPanel.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

943 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now