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.
有没有办法用 ThinkingSphinx 返回的数组检索相关值和结果?百分比,点数或其他什么,只是我可以使用的东西?
是的 - 您可以遍历结果集,并检索每个的权重:
results = ThinkingSphinx::Search.search(params[:q]) results.each_with_weighting do |result, weight| puts "#{result.name} #{weight}" end