sample solr config, add action to search form
[prawokultury.git] / doc / solr-conf / velocity / hitGrouped.vm
diff --git a/doc/solr-conf/velocity/hitGrouped.vm b/doc/solr-conf/velocity/hitGrouped.vm
new file mode 100644 (file)
index 0000000..cfb9ee3
--- /dev/null
@@ -0,0 +1,24 @@
+<div class="result-document">
+  <div class="result-title"><b>$grouping.key</b></div>
+  <div>Total Matches in Group: $grouping.value.matches</div>
+  <div>#foreach ($group in $grouping.value.groups)
+    <div class="group-value">$group.groupValue <span #annTitle("The count of the number of documents in this group")>($group.doclist.numFound)</span></div>
+    <div class="group-doclist" #annTitle("Contains the top scoring documents in the group")>
+      #foreach ($doc in $group.doclist)
+        #set($docId = $doc.getFieldValue('id'))
+        #if($doc.getFieldValue('name'))
+          #parse("product-doc.vm")
+        #elseif($doc.getFieldValue('compName_s'))
+          #parse("join-doc.vm")
+        #else
+          #parse("richtext-doc.vm")
+        #end
+      #end
+    </div>
+    #end</div>
+  </div>
+  #if($params.getBool("debugQuery",false))
+    <a href="#" onclick='jQuery(this).siblings("pre").toggle(); return false;'>toggle explain</a>
+    <pre style="display:none">$response.getExplainMap().get($doc.getFirstValue('id'))</pre>
+  #end
+</div>