wordpress 在SQL中,什么是'>>>'运算符?

d7v8vwbk  于 2022-11-02  发布在  WordPress
关注(0)|答案(1)|浏览(289)

我正在努力研究这个查询,它搜索一个MyIASAM表。当表被转换为InnoDB时,代码不再运行,所以我试图重写查询。
令人困惑的一点,这是不可能的谷歌,是'〉〉〉'操作符。
该查询返回一个排名列表,该列表基于标题和内容(crank和trank)的“相关性”
下面是查询:

SELECT ID, MATCH(post_title)
AGAINST ('>>>("weld") >(weld) ' IN BOOLEAN MODE) as trank,
MATCH(post_content_filtered) AGAINST ('>>("weld") (weld) ' IN BOOLEAN MODE) as crank
FROM wp_posts,wp_postmeta
WHERE wp_posts.post_type='ewimc_article'
AND wp_posts.post_status IN ('publish','private')
AND wp_posts.ID=wp_postmeta.post_id
AND wp_postmeta.meta_key='ewi_pub_year' 
AND ( ( (MATCH(post_title)
AGAINST ('+weld' IN BOOLEAN MODE)
OR MATCH(post_content_filtered)
AGAINST ('+weld' IN BOOLEAN MODE)) ) )
ORDER BY trank + crank DESC

那么,这些神秘的操作符是什么呢?有没有可以在InnoDB表中工作的替代品呢?

  • 谢谢-谢谢
qvtsj1bj

qvtsj1bj1#

用于mysql的全文索引和booleanmode中的搜索

> <

These two operators are used to change a word's contribution to the 
relevance value that is assigned to a row. The > operator increases 
 the contribution and the < operator decreases it.

因此,〉〉〉(“weld”)意味着所有字符的weld影响比其他字符的weld影响更大

相关问题