MySQL full text search plural / single word form

I have a table like this

CREATE TABLE jobs(
    id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
    title VARCHAR(200),
    body TEXT,
    FULLTEXT (title,body)
) ENGINE=MyISAM;

And two entries in this table

...
7. 10 Senior PHP Developers (Leaders) 
8. 30 PHP Developers..
...

And two requests:

  • Return 2 records above

    SELECT * FROM jobs WHERE MATCH (title,body) AGAINST ('developers')

  • Returns an empty set

    SELECT * FROM jobs WHERE MATCH (title,body) AGAINST ('developer')

I thought MySQL could find these entries using the "developer". But why didn't it work?

+5
source share
2 answers

You can switch to the full text using the logical operators: http://dev.mysql.com/doc/refman/5.5/en/fulltext-boolean.html

Search for:

SELECT * FROM jobs WHERE MATCH (title,body) AGAINST ('developer*' IN BOOLEAN MODE)

"", "" , "". "", " *", , , "", "",...

, MySQL . .

, "" ( : "" ). , , , - . , , , .

+4
select * from index_table where item_name rlike '[[:<:]]preform[s]*[es]*[ies]*[[:>:]]';

, . . , 90-95% .

Cheers, Ashish

+3

All Articles