MySQL Forums
Forum List  »  Full-Text Search

Partial matching in the middle of words
Posted by: Frank Thomson
Date: January 30, 2008 03:19PM

Hi,
I am trying to do a boolean full text search
http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html

How do I use a boolean search to get matches to the middle of words?

In more detail.....

I have a table that called item_master and it has a column called description.
There are 5 records with entries in the description field with the word Labcoat in them.

If I search for Labcoat or L*, or La* or whatever I get the 5 responses as expected. Here is an example query:-
query= SELECT * FROM item_master WHERE MATCH (description ) AGAINST ('Labcoat' IN BOOLEAN MODE )
So far all OK.

However I wish to search for coat.
query= SELECT * FROM item_master WHERE MATCH (description ) AGAINST ('coat' IN BOOLEAN MODE )
Zero results.

I try
*coat coat* *coat* +coat +coat*
No matching result.

A standard query, not a boolean type search function, used a the word 'like' as a modifier. For example:-
select * from item_master WHERE description like '%abc%'
and this would find labcoat. Note abc in the middle of labcoat.

So the question is
How do I use a boolean search to get matches to the middle of words?

Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
Partial matching in the middle of words
9067
January 30, 2008 03:19PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.