cluster_results.vm 697 B

12345678910111213141516171819202122232425262728293031
  1. #**
  2. * Actual rendering of Clusters
  3. *#
  4. ## For each cluster
  5. #foreach ($clusters in $response.response.clusters)
  6. #set($labels = $clusters.get('labels'))
  7. #set($docs = $clusters.get('docs'))
  8. ## This Cluster's Heading
  9. <h3>
  10. #foreach ($label in $labels)
  11. ## Keep the following line together to prevent
  12. ## a space appearing before each comma
  13. $label#if( $foreach.hasNext ),#end
  14. #end
  15. </h3>
  16. ## This Cluster's Documents
  17. <ol>
  18. ## For each doc in this cluster
  19. #foreach ($cluDoc in $docs)
  20. <li>
  21. <a href="#url_for_home?q=id:$cluDoc">
  22. $cluDoc</a>
  23. </li>
  24. #end
  25. </ol>
  26. #end ## end for each Cluster