Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
真的这是两个问题..但相关
1)我如何给标题列/索引中的短语“更大”的权重?
2) 如何防止部分匹配 - 例如,如果我搜索“艺术”,它会忽略“部分”、“购物车”等词...
1) setFieldWeights() API 函数就是为此。
2) 默认情况下,您不会获得部分匹配项。你必须做一些事情来启用它们 - 使用 min_prefix_len 和/或 min_infix_len。如果您确实想要中缀匹配,有时请查看 enable_star 选项。