gpt4 book ai didi

MySQL全文关键字顺序?

转载 作者:行者123 更新时间:2023-11-29 01:02:34 27 4
gpt4 key购买 nike

我现在正在做一个小搜索算法,我想知道MySQL全文搜索权重关键字是否按出现顺序排列?

例如:

Search Term: php macaroni pizza custard

在全文搜索中,PHP 是否比 custard 更“相关”?还是两者相等?

最佳答案

mySQL manual ,如果我没看错的话,说没有区别:

the rows returned are automatically sorted with the highest relevance first. Relevance values are nonnegative floating-point numbers. Zero relevance means no similarity. Relevance is computed based on the number of words in the row, the number of unique words in that row, the total number of words in the collection, and the number of documents (rows) that contain a particular word.

-

Every correct word in the collection and in the query is weighted according to its significance in the collection or query. Consequently, a word that is present in many documents has a lower weight (and may even have a zero weight), because it has lower semantic value in this particular collection. Conversely, if the word is rare, it receives a higher weight. The weights of the words are combined to compute the relevance of the row.

关于MySQL全文关键字顺序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2052939/

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