gpt4 book ai didi

postgresql - postgreSQL是否支持对短语进行全文搜索

转载 作者:行者123 更新时间:2023-11-29 13:51:37 25 4
gpt4 key购买 nike

假设我想搜索“Mad Max”并且我只想要“Max”跟在“Mad”之后的结果。即:

Mad Max is a good movie. ==> matched!
Max is not mad in the movie. ===> not matched.

看起来这是文档中没有提到的东西。我错过了什么吗?

最佳答案

供以后引用。

SELECT to_tsvector('fatal error') @@ to_tsquery('fatal <-> error');
?column?
----------
t

SELECT to_tsvector('error is not fatal') @@ to_tsquery('fatal <-> error');
?column?
----------
f

https://www.postgresql.org/docs/9.6/static/textsearch-intro.html#TEXTSEARCH-MATCHING

关于postgresql - postgreSQL是否支持对短语进行全文搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40037248/

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