title: Custom Query Component - How to get "score" from document id?
body: <p>I'm writing several Solr Custom Query Components.
  Each component run different kinds of queries:</p>
  
  <ul>
  <li>Component A: does a group by query  field A </li>
  <li>Component B: does a group by on a different fild B</li>
  </ul>
  
  <p>Each component will send it's the documents from it's result to the next component.</p>
  
  <p>In my "process" function, I'm donig the following after the result is set by grouping:</p>
  
  <pre><code>IndexSchema schema = searcher.getSchema();
  DocListAndSet s = result.getDocListAndSet();
  DocSet s3 = s.docSet;
  DocIterator dit = s3.iterator()
  while (dit.hasNext())
  {
      SolrDocument doc = new SolrDocument();
      int docid = dit.nextDoc();
      //float score = dit.score();&lt;--This does not get the score
  
      Document luceneDoc = searcher.doc(docid);//get the document using the doc id
      for( Fieldable field : luceneDoc.getFields())
      {
          SchemaField sf = schema.getField( field.name() );
          doc.addField( field.name(), sf.getType().toObject( field ) );
          ......
  
     }
  </code></pre>
  
  <p>And then iterating through the Set and createing SolrDocument.</p>
  
  <p>The SolrDocumentes are entered into a SolDocumentList and end I send it off to the next Component:</p>
  
  <pre><code>rb.req.getContext().put("TAG", list);
  </code></pre>
  
  <p>I also want to add a field called "score" SolrDocument, this field will contain the actual score. I've tried getting the score using:</p>
  
  <pre><code>float score = dit.score()
  </code></pre>
  
  <p>But the above does not get the score of the document. How do I get the "score" of the document using the document id?</p>