gpt4 book ai didi

ruby-on-rails - Searchkick 结果不相关

转载 作者:数据小太阳 更新时间:2023-10-29 07:00:34 24 4
gpt4 key购买 nike

我对相关搜索有疑问。以下请求的结果很奇怪:

Candidate.search('martin', fields: [:first_name, :last_name], 
match: :word_start, misspellings: false).map(&:name)


["Kautzer Martina",
"Funk Martin",
"Jaskolski Martin",
"Gutmann Martine",
"Wiegand Martina",
"Schueller Martin",
"Dooley Martin",
"Stiedemann Martine",
"Bartell Martina",
"Gerlach Martine",
"Green Martina",
"Lang Martine",
"Legros Martine",
"Ernser Martina",
"Boehm Martina",
"Green Martine",
"Nolan Martin",
"Schmidt Martin",
"Hoppe Martin",
"Macejkovic Martine",
"Emard Martine"]

为什么 Martina 比 Martin 去得早?

Searckick 配置:

searchkick language: %w(German English), word_start: [:first_name, :last_name]

最佳答案

Searchkick 1.4 修复了这个问题。甚至还有一个 test case致力于这个问题:)

关于ruby-on-rails - Searchkick 结果不相关,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36862825/

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