You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by gs...@apache.org on 2010/10/26 22:56:46 UTC

svn commit: r1027743 - in /lucene/dev/trunk/solr/example/solr/conf: solrconfig.xml velocity/cluster.vm velocity/clusterResults.vm velocity/facets.vm

Author: gsingers
Date: Tue Oct 26 20:56:46 2010
New Revision: 1027743

URL: http://svn.apache.org/viewvc?rev=1027743&view=rev
Log:
SOLR-2178: Hook in Carrot2 clustering to /browse

Added:
    lucene/dev/trunk/solr/example/solr/conf/velocity/cluster.vm
    lucene/dev/trunk/solr/example/solr/conf/velocity/clusterResults.vm
Modified:
    lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml
    lucene/dev/trunk/solr/example/solr/conf/velocity/facets.vm

Modified: lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml?rev=1027743&r1=1027742&r2=1027743&view=diff
==============================================================================
--- lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml (original)
+++ lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml Tue Oct 26 20:56:46 2010
@@ -871,6 +871,14 @@
        <!--<int name="carrot.numDescriptions">5</int>-->
        <!-- produce sub clusters -->
        <bool name="carrot.outputSubClusters">false</bool>
+       
+       <str name="defType">edismax</str>
+       <str name="qf">
+          text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
+       </str>
+       <str name="q.alt">*:*</str>
+       <str name="rows">10</str>
+       <str name="fl">*,score</str>
     </lst>     
     <arr name="last-components">
       <str>clusteringComponent</str>

Added: lucene/dev/trunk/solr/example/solr/conf/velocity/cluster.vm
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/conf/velocity/cluster.vm?rev=1027743&view=auto
==============================================================================
--- lucene/dev/trunk/solr/example/solr/conf/velocity/cluster.vm (added)
+++ lucene/dev/trunk/solr/example/solr/conf/velocity/cluster.vm Tue Oct 26 20:56:46 2010
@@ -0,0 +1,9 @@
+<h2 #annTitle("Clusters generated by Carrot2 using the /clustering RequestHandler")>Clusters</h2>
+<div id="clusters">
+  Run Solr with java -Dsolr.clustering.enabled=true -jar start.jar to see results
+</div>
+<script type="text/javascript">
+
+  $('#clusters').load("#url_for_solr/clustering#lens",
+    {'wt':'velocity', 'v.template':"clusterResults"});
+</script>

Added: lucene/dev/trunk/solr/example/solr/conf/velocity/clusterResults.vm
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/conf/velocity/clusterResults.vm?rev=1027743&view=auto
==============================================================================
--- lucene/dev/trunk/solr/example/solr/conf/velocity/clusterResults.vm (added)
+++ lucene/dev/trunk/solr/example/solr/conf/velocity/clusterResults.vm Tue Oct 26 20:56:46 2010
@@ -0,0 +1,12 @@
+#foreach ($clusters in $response.response.clusters)
+    #set($labels = $clusters.get('labels'))
+    #set($docs = $clusters.get('docs'))
+    <h3>#foreach ($label in $labels)$label#if( $foreach.hasNext ),#end#end</h3>
+        <ol>
+        #foreach ($cluDoc in $docs)
+          <li><a href="#url_for_home?q=id:$cluDoc">$cluDoc</a></li>
+        #end
+        </ol>
+        
+    
+#end
\ No newline at end of file

Modified: lucene/dev/trunk/solr/example/solr/conf/velocity/facets.vm
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/conf/velocity/facets.vm?rev=1027743&r1=1027742&r2=1027743&view=diff
==============================================================================
--- lucene/dev/trunk/solr/example/solr/conf/velocity/facets.vm (original)
+++ lucene/dev/trunk/solr/example/solr/conf/velocity/facets.vm Tue Oct 26 20:56:46 2010
@@ -3,6 +3,7 @@
 #parse('facet_ranges.vm')
 #parse('facet_dates.vm')
 #parse('facet_pivot.vm')
+#parse('cluster.vm')