HI Ahmet, I was looking for the same. Thanks for your early response. Warm Regards, Allahbaksh
On Sun, Dec 27, 2009 at 7:22 PM, AHMET ARSLAN <iori...@yahoo.com> wrote: > > 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. > > > > -- Allahbaksh Mohammedali Asadullah, Software Engineering & Technology Labs, Infosys Technolgies Limited, Electronic City, Hosur Road, Bangalore 560 100, India. (Board: 91-80-28520261 | Extn: 73927 | Direct: 41173927. Fax: 91-80-28520362 | Mobile: 91-9845505322.