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 of why this is happening.
It doesn't seem like any debugging information is exposed to Sunspot, so I think that I need to debug through Solr directly. Fortunately, Solr has a handy web interface to search from, but for some reason, any queries I enter there return with 0 results.
For example, when I search for the word "test" on my web app, it returns plenty of hits. When I search for the same thing on the Solr admin interface this is what I get:
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">172</int>
<lst name="params">
<str name="explainOther"/>
<str name="fl">*,score</str>
<str name="indent">on</str>
<str name="start">0</str>
<str name="q">test</str>
<str name="hl.fl"/>
<str name="qt">standard</str>
<str name="wt">standard</str>
<str name="fq"/>
<str name="version">2.2</str>
<str name="rows">10</str>
</lst>
</lst>
<result name="response" numFound="0" start="0" maxScore="0.0"/>
</response>