Debugging Solr search queries on Sunspot

后端 未结 5 1694
陌清茗
陌清茗 2021-01-19 02:06

How can I debug Solr search queries when using the Sunspot gem on Rails? I have some queries that are returning bizarrely high scores, and I\'m trying to get to the bottom

5条回答
  •  长发绾君心
    2021-01-19 03:04

    If setting log_level to FINEST doesn't work, you should add this line to an initializer:

    require "sunspot/rails/solr_logging"
    

    source: http://outoftime.github.com/2010/03/03/sunspot-1-0.html

提交回复
热议问题