relevance score of MATCH..AGAINST is not working (MySql)

Relevance score of MATCH..AGAINST is not working.

Created one dummy table which has 2 rows.

Dummy Table

Row1=> 'Leela Hayat Marriot'

Row2=> 'Americas Best Value'

Query1:

SELECT MATCH (col1) AGAINST ('Leela* Hayat*' IN BOOLEAN MODE) AS relevance FROM table1 WHERE MATCH (col1) AGAINST ('Leela* Hayat*' IN BOOLEAN MODE);

Result:

relevance

2

Query2:

SELECT MATCH (col1) AGAINST ('Americas* Best*' IN BOOLEAN MODE) AS relevance FROM table1 WHERE MATCH (col1) AGAINST ('Americas* Best*' IN BOOLEAN MODE);

Result:

relevance

1

Query1 is working fine but why is query 2 not working?

Why am I getting relevance 1 instead of 2 in Query2 as Americas and Best both are present in column.

Thanks


http://dev.mysql.com/doc/refman/5.7/en/fulltext-stopwords.html

'BEST' is listed in stopword list.

http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_ft_stopword_file

ft_stopword_file:

The file from which to read the list of stopwords for full-text searches on MyISAM tables. The server looks for the file in the data directory unless an absolute path name is given to specify a different directory. All the words from the file are used; comments are not honored. By default, a built-in list of stopwords is used (as defined in the storage/myisam/ft_static.c file). Setting this variable to the empty string ('') disables stopword filtering.

I disabled stopwords list and now query 2 is working fine.

Thanks for help.

链接地址: http://www.djcxy.com/p/13114.html

上一篇: MySQL 5.6.10全文搜索不兼容#

下一篇: MATCH..AGAINST的相关性分数不起作用(MySql)