Solved

MySQL MATCH query for part words

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

777 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