Hi, I am facing a issue while using SOLR-769 patch for search clustering. I am following this link for configuration http://wiki.apache.org/solr/ClusteringComponent . Here is what I have done for configuring this patch
1) Applied the patch to my Solr source code and got it compiled. So my new Solr source code has two more packages i) org.apache.solr.handler.clustering ii) org.apache.solr.handler.clustering.carrot2 2) Also I have carrot2-core jar ,apache-solr-solrj jar in my classpath. 3) Now I am initializing a solr core this way CoreContainer cores=new CoreContainer(instanceDir,configDir); SolrCore core=cores.getCore(“core0”); SolrServer solrServer=new EmbeddedSolrServer(cores, "core0"); 4) After this I am indexing and querying a indexed document . 5) Now for the clustering part my code looks like this.. MatchAllDocsQuery matchedQuery = new MatchAllDocsQuery(); SolrIndexSearcher searcher=core.getSearcher().get(); DocList docList=searcher.getDocList(matchedQuery, (Query) null, new Sort(), 0, 10); ClusteringComponent comp = (ClusteringComponent) core.getSearchComponent("clustering"); CarrotClusteringEngine engine = (CarrotClusteringEngine) comp.getSearchClusteringEngines().get("default"); NamedList results= engine.cluster(matchedQuery, docList, solrParams); After I run my code I am able to index and search properly but when the last three lineos code in step 5 are executed I am getting the following exception: java.lang.IllegalStateException: Controller not initialized. at org.carrot2.core.CachingController.processInternal(CachingController.java:264) at org.carrot2.core.CachingController.process(CachingController.java:251) at org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngine.cluster(CarrotClusteringEngine.java:112) at com.cognizant.solr_I1.AddIndex.readSolrIndex(AddIndex.java:193) at com.cognizant.solr_I1.AddIndex.main(AddIndex.java:231) Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalStateException: Controller not initialized. at org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngine.cluster(CarrotClusteringEngine.java:124) at com.cognizant.solr_I1.AddIndex.readSolrIndex(AddIndex.java:193) at com.cognizant.solr_I1.AddIndex.main(AddIndex.java:231) Caused by: java.lang.IllegalStateException: Controller not initialized. at org.carrot2.core.CachingController.processInternal(CachingController.java:264) at org.carrot2.core.CachingController.process(CachingController.java:251) at org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngine.cluster(CarrotClusteringEngine.java:112) ... 2 more Please help me out with this issue . Thanks in advance.. -- View this message in context: http://www.nabble.com/Issue-using-SOLR-769-Patch-for-Clustering-tp22407797p22407797.html Sent from the Solr - Dev mailing list archive at Nabble.com.