Site owners

  • Swapnil Kulkarni

Page authors

  • Swapnil Kulkarni
    June 23, 2012
Tech-Talk‎ > ‎

How to configure and run Carrot2 Web Application with Solr Document Source (on Ubuntu 10.04)

What is Carrot2 Web Application?
Carrot2 Web Application exposes Carrot2 clustering as a web application for end users. It allows users to browse clusters using a conventional tree view, but also in an attractive visualization

For more details please visit here

Installation and running

**Important:
I assume that you have followed my previous tutorials and have basic understanding of Carrot2.If not then please visit here

Step1:
Step2:
Then follow these steps:
  1. Download Carrot2 Web Application WAR file
  2. Deploy the WAR file on Tomcat-6 using tomcat manager
  3. Open for editing the suite-webapp.xml file, located in the WEB-INF/suites directory of the WAR file.
  4. Add <include suite="source-solr.xml" /> You may drop other document sources as per your requirements
  5. Open for editing the source-solr.xml file, located in the WEB-INF/suites directory of the WAR file.Here you can customize label,title and icon of your search engine
  6. Open for editing the source-solr-attributes.xml file, located in the WEB-INF/suites directory of the WAR file.Here you actually set attribute values for search engine.Delete exisitng contents of this file and paste following:
<attribute-sets default="overridden-attributes">
  <attribute-set id="overridden-attributes">
    <value-set>
     
     
<label>overridden-attributes</label>
    
     <attribute key="SolrDocumentSource.serviceUrlBase">
           <value type="java.lang.String" value="http://127.0.0.1:8080/solr/select"/>
     </attribute>
    
     <attribute key="SolrDocumentSource.solrSummaryFieldName">
       <value type="java.lang.String" value="content"/>
     </attribute>

     <attribute key="SolrDocumentSource.solrTitleFieldName">
       <value type="java.lang.String" value="title"/>
     </attribute>
 
   </value-set>
 </attribute-set>
</attribute-sets>

Once this is done you can even add more attribute sets as per your requirements.You may also export customized attributes from Carrot2 Document Clustering Workbench and paste them over here.To learn more about it please visit here

      7. Restart the tomcat using sudo service tomcat6 restart
      8. Visit http://localhost:8080/carrot2-webapp-3.5.0-dev/search


And, you are done...Enjoy!!


Comments