Description:
sample process
i create table for full text search test.
create table test_fts(
`id` int(11) NOT NULL AUTO_INCREMENT,
col1 varchar(250),
col2 text DEFAULT NULL,
col3 varchar(250),
FULLTEXT KEY `keyword_full_text` (`col1`,`col2`,`col3`),
PRIMARY KEY (`id`)) engine=innodb DEFAULT CHARSET=utf8
i added data
insert into test_fts(col1,col2,col3) values('hasan-new','test','hasan uçak')
insert into test_fts(col1,col2,col3) values('hasan-new','','hasan uçak')
insert into test_fts(col1,col2,col3) values('hasan-new11','test','hasan uçak')
i exec this sql statement.
SELECT *
FROM test_fts WHERE
( MATCH (col1,col2,col3) AGAINST ('+\"hasan uçak\"' IN BOOLEAN MODE) )
1 hasan-new test hasan uçak
2 hasan-new hasan uçak
3 hasan-new11 test hasan uçak
no problem
when i recreate full text index
alter table test_fts drop index keyword_full_text;
alter table test_fts add FULLTEXT INDEX keyword_full_text(`col1`, `col2`, `col3`);
query results are
1 hasan-new test hasan uçak
3 hasan-new11 test hasan uçak
one row is lost.
when i using null value instead empty string, no problem
when anyone value of columns is empty string in index fields , i could get this row. Mysql can't push columns which after empty string column, value to index data is it?
How to repeat:
allways.
Description: sample process i create table for full text search test. create table test_fts( `id` int(11) NOT NULL AUTO_INCREMENT, col1 varchar(250), col2 text DEFAULT NULL, col3 varchar(250), FULLTEXT KEY `keyword_full_text` (`col1`,`col2`,`col3`), PRIMARY KEY (`id`)) engine=innodb DEFAULT CHARSET=utf8 i added data insert into test_fts(col1,col2,col3) values('hasan-new','test','hasan uçak') insert into test_fts(col1,col2,col3) values('hasan-new','','hasan uçak') insert into test_fts(col1,col2,col3) values('hasan-new11','test','hasan uçak') i exec this sql statement. SELECT * FROM test_fts WHERE ( MATCH (col1,col2,col3) AGAINST ('+\"hasan uçak\"' IN BOOLEAN MODE) ) 1 hasan-new test hasan uçak 2 hasan-new hasan uçak 3 hasan-new11 test hasan uçak no problem when i recreate full text index alter table test_fts drop index keyword_full_text; alter table test_fts add FULLTEXT INDEX keyword_full_text(`col1`, `col2`, `col3`); query results are 1 hasan-new test hasan uçak 3 hasan-new11 test hasan uçak one row is lost. when i using null value instead empty string, no problem when anyone value of columns is empty string in index fields , i could get this row. Mysql can't push columns which after empty string column, value to index data is it? How to repeat: allways.