问题描述:

As far as I understand from the MySQL Docs, the following should return results:

DROP TABLE myuser;

CREATE TABLE myuser (firstname varchar(100), lastname varchar(100), fulltext (firstname, lastname) with parser ngram);

INSERT INTO myuser (firstname, lastname) VALUES

('jimbo', 'hello'),

('jimbo', 'hello'),

('jimbo', 'hello'),

('firerkmjim', 'worhell'),

('ffoorkm', 'dfa fdfds hello'),

('oorkm', 'wordfa hello');

select * from myuser where match (firstname, lastname) against ('jim' IN natural language mode);

However, I get no results back.

And looking at the cache, 'ji' is just not indexed at all:

SET GLOBAL innodb_ft_aux_table = 'test/myuser';

SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;

returns:

'bo', '2', '4', '3', '2', '3'

'bo', '2', '4', '3', '3', '3'

'bo', '2', '4', '3', '4', '3'

...

There's no 'ji' indexed it seems. Help?

相关阅读:
Top