Solved

MySQL MATCH query for part words

Posted on 2010-11-17
3
418 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
Comment Utility
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
Comment Utility
"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
Comment Utility
Thanks for the heads up
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

15 Experts available now in Live!

Get 1:1 Help Now