> Hi Erik, > I had set the Clustering true at server side. But I want to > get the response > of Clustering result through solrj. > > As I get Facet response can I get response of Clustering > (docId, and label ) > through solrj. >
By solrJ you mean EmbeddedSolrServer? If yes i think you can enable it by System.setProperty("solr.clustering.enabled", "true"); as a first line in your main program. Alternatively you can enable by hard coding in solrconfig.xml <searchComponent name="clusteringComponent" enable="true" class="org.apache.solr.handler.clustering.ClusteringComponent"> I didnt try by myself but to query it by SolrServer you can activate it with qt parameter: ModifiableSolrParams params = new ModifiableSolrParams(); params.set("qt", "/clustering"); params.set("q", "apple"); params.set("carrot.title", "myTitle"); params.set("clustering", "true"); QueryResponse response = solr.query(params); System.out.println("response = " + response); Hope this helps.