title: How do I get the tf and idf score from a Solr query?
body: <p>Following Solr documentations (<a href="https://cwiki.apache.org/confluence/display/solr/Function+Queries" rel="nofollow noreferrer">https://cwiki.apache.org/confluence/display/solr/Function+Queries</a> and others) I should just put idf(fieldname, 'term') as I do with termfreq(fieldname, 'term') in the field list. However, whenever I try this I get an exception as:</p>
  
  <pre><code>org.apache.solr.client.solrj.SolrServerException: No live SolrServers available to handle this request
  </code></pre>
  
  <p>By looking at the logs I could find:</p>
  
  <pre><code>null:java.lang.UnsupportedOperationException: requires a TFIDFSimilarity (such as ClassicSimilarity)
  </code></pre>
  
  <p>And I have no idea what those are. Also when I use <strong><em>debugQuery=on</em></strong> it shows me, along with a lot of other things, the idf value for the document as:</p>
  
  <pre><code>4.406719 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5))
  </code></pre>
  
  <p>What should I do to fix these errors or to get desired tf and idf value for a term?</p>