mysql fulltext boolean search with asterix

I have a query like below:

SELECT prd_id FROM products WHERE MATCH (prd_search_field) AGAINST ('+gul* +yetistiren* +adam*' in boolean mode);

This doesn't return the rows including 'gul'.

http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html The document says this.

Then a search for '+word +the*' will likely return fewer rows than a search for '+word +the': The former query remains as is and requires both word and the* (a word starting with the) to be present in the document. The latter query is transformed to +word (requiring only word to be present). the is both too short and a stopword, and either condition is enough to cause it to be ignored.

So as I understood the too short word condition must not be applied in my situation since I use * after each word. What's wrong with this?

As a solution I use the below query but since it's slow, I need to find another solution. Any idea would be appreciated? Thanks in advance..

SELECT prd_id FROM products WHERE 1 AND MATCH (prd_search_field) AGAINST ('+yetistiren* +adam*' in boolean mode) AND prd_search_field LIKE '%gul%';

As a note ft_min_word_length=4 as default in all shared hosting environments, and I cannot change it.

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

上一篇: MySQL无法用特定的单词进行全文搜索

下一篇: mysql fulltext用asterix进行布尔搜索