Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

模糊匹配用contains似乎逻辑有点问题 #1026

Closed
LambdaYH opened this issue Aug 22, 2022 · 1 comment · Fixed by #1032
Closed

模糊匹配用contains似乎逻辑有点问题 #1026

LambdaYH opened this issue Aug 22, 2022 · 1 comment · Fixed by #1032

Comments

@LambdaYH
Copy link
Contributor

LambdaYH commented Aug 22, 2022

(cls.word_type == 1) & (cls.problem.contains(problem))

这句意思应该是数据库problem属性包含输入的problem字符串时返回true
而模糊匹配本意应当是输入的problem字符串包含数据库problem属性时才返回true
这里似乎相反逻辑了

大概可能得
select * from word_bank2 where ...... and '字符串' like concat('%', problem, '%');

@HibiKier
Copy link
Owner

恩,我搞反了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants