gpt4 book ai didi

mysql - 有趣的 MATCH AGAINST 问题 : not searching some words

转载 作者:行者123 更新时间:2023-11-29 00:31:03 25 4
gpt4 key购买 nike

我有一个这样的表:

|====brand=====|======title================|
|....Apple.....|...iPhone 5 32 GB..........|
|....Sony......|...Bluetooth Headset.......|

我使用全文搜索基本上是这样的:

SELECT
*,
MATCH(brand,title) AGAINST ('some words') as score
FROM
table

所以当我搜索耳机时,mysql 给出了 1.812121 的真实分数。

但是当我搜索 iphone 时; mysql 给 0 分。

P.s: ft_min_word_len = 2

最佳答案

来自 http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html

A natural language search interprets the search string as a phrase in natural human language (a phrase in free text). There are no special operators. The stopword list applies. In addition, words that are present in 50% or more of the rows are considered common and do not match. Full-text searches are natural language searches if no modifier is given.

所以关于常用词的部分听起来很可能。

关于mysql - 有趣的 MATCH AGAINST 问题 : not searching some words,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16507761/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com