solrj - Error in executing solr search query from a CloudSolrServer object -


here trying fire solr search query, using cloudsolrserver class pass zookeeper instance , creating instance of solrquery object search.

        cloudsolrserver solr = new cloudsolrserver("host_name:port");          system.out.println(solr.getzkstatereader());         solrquery solrquery = new solrquery();          solrquery.set("q", "abc");         solrquery.addfilterquery("type:*");         solrquery.set("deftype", "edismax");         solrquery.set("start", 0);         solrquery.set("rows", 10);         solrquery.set("qf", "name^10.0 description^5.0");         solrquery.addsortfield("name_sort", solrquery.order.asc);          queryresponse response = solr.query(solrquery); 

when running getting error:

null org.apache.solr.client.solrj.solrserverexception: error executing query     @ org.apache.solr.client.solrj.request.queryrequest.process(queryrequest.java:98)     @ org.apache.solr.client.solrj.solrserver.query(solrserver.java:301)     @ solrcloud_example.main(solrcloud_example.java:40) caused by: java.lang.runtimeexception     @ org.apache.solr.common.cloud.solrzkclient.<init>(solrzkclient.java:115)     @ org.apache.solr.common.cloud.solrzkclient.<init>(solrzkclient.java:83)     @ org.apache.solr.common.cloud.zkstatereader.<init>(zkstatereader.java:138)     @ org.apache.solr.client.solrj.impl.cloudsolrserver.connect(cloudsolrserver.java:140)     @ org.apache.solr.client.solrj.impl.cloudsolrserver.request(cloudsolrserver.java:165)     @ org.apache.solr.client.solrj.request.queryrequest.process(queryrequest.java:90)     ... 2 more 

could me on issue?

i have faced same exception. in result such connection workable me: cloudsolrserver solrserver = new cloudsolrserver("c-node3:2181/solr");

/solr in end


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -