Zookeeper setup
[lui-solr.git] / zookeeper / solr / collection1 / conf / velocity / cluster.vm
diff --git a/zookeeper/solr/collection1/conf/velocity/cluster.vm b/zookeeper/solr/collection1/conf/velocity/cluster.vm
new file mode 100644 (file)
index 0000000..4957071
--- /dev/null
@@ -0,0 +1,19 @@
+#**
+ *  Check if Clustering is Enabled and then
+ *  call cluster_results.vm
+ *#
+
+<h2 #annTitle("Clusters generated by Carrot2 using the /clustering RequestHandler")>
+  Clusters
+</h2>
+
+## Div tag has placeholder text by default
+<div id="clusters">
+  Run Solr with java -Dsolr.clustering.enabled=true -jar start.jar to see results
+</div>
+
+## Replace the div content *if* Carrot^2 is available
+<script type="text/javascript">
+  $('#clusters').load("#url_for_solr/clustering#lens",
+    {'wt':'velocity', 'v.template':"cluster_results"});
+</script>