Index: src/java/org/apache/nutch/clustering/HitsCluster.java
===================================================================
--- src/java/org/apache/nutch/clustering/HitsCluster.java	(revision 411762)
+++ src/java/org/apache/nutch/clustering/HitsCluster.java	(working copy)
@@ -16,6 +16,7 @@
 
 package org.apache.nutch.clustering;
 
+import org.apache.nutch.searcher.Hit;
 import org.apache.nutch.searcher.HitDetails;
 
 /**
@@ -39,11 +40,24 @@
   public HitsCluster [] getSubclusters();
   
   /**
+   * @return Returns a relevance-ordered array of hit details belonging
+   * to this cluster or <code>null</code> if this cluster
+   * has no associated documents (it may have subclusters only).
+   */
+  public HitDetails[] getHitDetails();
+  
+  /**
    * @return Returns a relevance-ordered array of the hits belonging
    * to this cluster or <code>null</code> if this cluster
    * has no associated documents (it may have subclusters only).
    */
-  public HitDetails[] getHits();
+  public Hit[] getHits();
+    
+  /**
+   * @return Returns relevance scores (how well documents fit to
+   * this cluster), normalized between 0.0f - 1.0f.
+   */
+  public float[] getScores();
   
   /**
    * @return Returns an array of labels for this cluster. The labels should
Index: src/java/org/apache/nutch/clustering/OnlineClusterer.java
===================================================================
--- src/java/org/apache/nutch/clustering/OnlineClusterer.java	(revision 411762)
+++ src/java/org/apache/nutch/clustering/OnlineClusterer.java	(working copy)
@@ -18,6 +18,7 @@
 
 // Nutch imports
 import org.apache.nutch.plugin.Pluggable;
+import org.apache.nutch.searcher.Hit;
 import org.apache.nutch.searcher.HitDetails;
 
 
@@ -54,5 +55,5 @@
    * 
    * @return A set of {@link HitsCluster} objects.
    */
-  public HitsCluster [] clusterHits(HitDetails [] hitDetails, String [] descriptions);
+  public HitsCluster [] clusterHits(Hit[] hits, HitDetails [] hitDetails, String [] descriptions);
 }
Index: src/web/jsp/cluster.jsp
===================================================================
--- src/web/jsp/cluster.jsp	(revision 411762)
+++ src/web/jsp/cluster.jsp	(working copy)
@@ -1,3 +1,4 @@
+<%@page import="org.apache.hadoop.io.FloatWritable"%>
 <%
 
 // @author Dawid Weiss
@@ -23,7 +24,7 @@
 if (clusterer != null) {
   final long clusteringStart = System.currentTimeMillis();
   try {
-    clusters = clusterer.clusterHits( details, Summary.toStrings(summaries) );
+    clusters = clusterer.clusterHits( show, details, Summary.toStrings(summaries) );
     final long clusteringDuration = System.currentTimeMillis() - clusteringStart;
     bean.LOG.info("Clustering took: " + clusteringDuration + " milliseconds.");
   } catch (Exception e) {
@@ -63,20 +64,55 @@
       %></div><%
        
       // now output sample documents from the inside
-      HitDetails[] documents = cluster.getHits();
+      HitDetails[] documents = cluster.getHitDetails();
+      Hit[] docHits = cluster.getHits();
+      boolean showDocScore = false;
+      float maxDocScore = 0.0f;
+      // normalize the max score
+      Object o = docHits[0].getSortValue();
+      if (o instanceof FloatWritable) {
+        showDocScore = true;
+        for (int k = 0; k < docHits.length; k++) {
+          float val = ((FloatWritable)docHits[k].getSortValue()).get();
+          if (val > maxDocScore) maxDocScore = val;
+        }
+      }
+      float[] scores = cluster.getScores();
       if (documents.length > 0) {
-        %><ul style="font-size: 90%; margin-top: .5em;"><%
+        %><table><%
         for (int k = 0; k < Q && k < documents.length; k++) {
           HitDetails detail = documents[ k ];
           String title = detail.getValue("title");
           String url = detail.getValue("url");
           if (title == null || title.equals("")) title = url;
           if (title.length() > 35) title = title.substring(0,35) + "...";
-          %>
-            <li><a href="<%=url%>"><%= Entities.encode(title) %></a></li>
+          %><tr><td><%
+          int ww;
+          if (showDocScore) {
+            ww = Math.round(3.0f * ((FloatWritable)docHits[k].getSortValue()).get() / maxDocScore);
+            %><span style="font-size: 9px; font-weight: bold; color: red"><%
+            for (int m = 0; m < ww; m++) {
+              %>|<%
+            }
+            %></span><span style="font-size: 9px; font-weight: bold; color: #b8b8b8"><%
+            for (int m = ww; m < 3; m++) {
+              %>|<%
+            }
+            %></span>&nbsp;<%
+          }
+          ww = Math.round(3.0f * scores[k]);
+          %><span style="font-size: 9px; font-weight: bold; color: blue"><%
+          for (int m = 0; m < ww; m++) {
+            %>|<%
+          }
+          %></span><span style="font-size: 9px; font-weight: bold; color: #b8b8b8"><%
+          for (int m = ww; m < 3; m++) {
+            %>|<%
+          }
+          %></span></td><td><a href="<%=url%>"><%= Entities.encode(title) %></a></td></tr>
           <%
         }
-        %></ul><%
+        %></table><%
       }
        
       // ignore subclusters for now, ALTHOUGH HIERARCHICAL CLUSTERING
Index: src/plugin/clustering-carrot2/src/java/org/apache/nutch/clustering/carrot2/Clusterer.java
===================================================================
--- src/plugin/clustering-carrot2/src/java/org/apache/nutch/clustering/carrot2/Clusterer.java	(revision 411770)
+++ src/plugin/clustering-carrot2/src/java/org/apache/nutch/clustering/carrot2/Clusterer.java	(working copy)
@@ -25,6 +25,7 @@
 import org.apache.hadoop.util.LogFormatter;
 import org.apache.nutch.clustering.HitsCluster;
 import org.apache.nutch.clustering.OnlineClusterer;
+import org.apache.nutch.searcher.Hit;
 import org.apache.nutch.searcher.HitDetails;
 
 import com.dawidweiss.carrot.core.local.*;
@@ -175,7 +176,7 @@
   /**
    * See {@link OnlineClusterer} for documentation.
    */
-  public HitsCluster [] clusterHits(HitDetails [] hitDetails, String [] descriptions) {
+  public HitsCluster [] clusterHits(Hit[] hits, HitDetails [] hitDetails, String [] descriptions) {
     Map requestParams = new HashMap();
     requestParams.put(LocalNutchInputComponent.NUTCH_INPUT_HIT_DETAILS_ARRAY,
       hitDetails);
@@ -196,7 +197,7 @@
       int j = 0;
       for (Iterator i = outputClusters.iterator(); i.hasNext(); j++) {
         RawCluster rcluster = (RawCluster) i.next();
-        clusters[j] = new HitsClusterAdapter(rcluster, hitDetails);
+        clusters[j] = new HitsClusterAdapter(rcluster, hits, hitDetails);
       }
 
       // invoke Carrot2 process here.
Index: src/plugin/clustering-carrot2/src/java/org/apache/nutch/clustering/carrot2/HitsClusterAdapter.java
===================================================================
--- src/plugin/clustering-carrot2/src/java/org/apache/nutch/clustering/carrot2/HitsClusterAdapter.java	(revision 411770)
+++ src/plugin/clustering-carrot2/src/java/org/apache/nutch/clustering/carrot2/HitsClusterAdapter.java	(working copy)
@@ -23,6 +23,7 @@
 import com.dawidweiss.carrot.core.local.clustering.RawDocument;
 
 import org.apache.nutch.clustering.HitsCluster;
+import org.apache.nutch.searcher.Hit;
 import org.apache.nutch.searcher.HitDetails;
 
 /**
@@ -34,7 +35,8 @@
  */
 public class HitsClusterAdapter implements HitsCluster {
   private RawCluster rawCluster;
-  private HitDetails [] hits;
+  private Hit [] hits;
+  private HitDetails [] hitDetails;
 
   /**
    * Lazily initialized subclusters array.
@@ -47,11 +49,22 @@
   private HitDetails [] documents;
   
   /**
+   * Lazily initialized document hits array.
+   */
+  private Hit [] docHits;
+  
+  /**
+   * Lazily initialized score array.
+   */
+  private float [] scores;
+  
+  /**
    * Creates a new adapter.
    */
-  public HitsClusterAdapter(RawCluster rawCluster, HitDetails [] hits) {
+  public HitsClusterAdapter(RawCluster rawCluster, Hit[] hits, HitDetails [] hitDetails) {
     this.rawCluster = rawCluster;
     this.hits = hits;
+    this.hitDetails = hitDetails;
   }
 
   /*
@@ -67,7 +80,7 @@
         int j = 0;
         for (Iterator i = rawSubclusters.iterator(); i.hasNext(); j++) {
           RawCluster c = (RawCluster) i.next();
-          subclusters[j] = new HitsClusterAdapter(c, hits);
+          subclusters[j] = new HitsClusterAdapter(c, hits, hitDetails);
         }
       }
     }
@@ -75,25 +88,53 @@
     return subclusters;
   }
 
+  /* Lazily load all arrays. */
+  private void populate() {
+    List rawDocuments = this.rawCluster.getDocuments();
+    documents = new HitDetails[ rawDocuments.size() ];
+    docHits = new Hit[rawDocuments.size()];
+    scores = new float[rawDocuments.size()];
+    
+    int j = 0;
+    float norm = 1.0f;
+    for (Iterator i = rawDocuments.iterator(); i.hasNext(); j++) {
+      RawDocument doc = (RawDocument) i.next();
+      Integer offset = (Integer) doc.getId();
+      documents[j] = this.hitDetails[offset.intValue()];
+      docHits[j] = this.hits[offset.intValue()];
+      if (j == 0) {
+        norm = doc.getScore();
+        if (norm == 0.0f) norm = 1.0f;
+      }
+      scores[j] = doc.getScore() / norm;
+    }
+  }
   /*
-   * @see org.apache.nutch.clustering.HitsCluster#getHits()
+   * @see org.apache.nutch.clustering.HitsCluster#getHitDetails()
    */
-  public HitDetails[] getHits() {
+  public HitDetails[] getHitDetails() {
     if (documents == null) {
-      List rawDocuments = this.rawCluster.getDocuments();
-      documents = new HitDetails[ rawDocuments.size() ];
-      
-      int j = 0;
-      for (Iterator i = rawDocuments.iterator(); i.hasNext(); j++) {
-        RawDocument doc = (RawDocument) i.next();
-        Integer offset = (Integer) doc.getId();
-        documents[j] = this.hits[offset.intValue()];
-      }
+      populate();
     }
 
     return documents;
   }
+  
+  public Hit[] getHits() {
+    if (docHits == null) {
+      populate();
+    }
 
+    return docHits;
+  }
+
+  public float[] getScores() {
+    if (scores == null) {
+      populate();
+    }
+    return scores;
+  }
+      
   /*
    * @see org.apache.nutch.clustering.HitsCluster#getDescriptionLabels()
    */
