java - Solr 4.3 multicore -
i new solr.i don't know how use solr in java application out using solrj.i need to simple task crud(insert/update/delete etc..).so google , find out usefull code..but don't know,it going work or not.the code
defaulthttpclient httpclient = new defaulthttpclient(); httppost postrequest = new httppost("http://solrhost.com:8983/solr/update/json"); stringentity input = new stringentity("{\"firstname\":\"bob\",\"lastname\":\"williams\"}"); input.setcontenttype("application/json"); postrequest.setentity(input); httpresponse response = httpclient.execute(postrequest); how insert data in multicore.i.e 2 or more core @ single time
if want call solr api directly then have specify core use in url, in example url this: http://solrhost.com:8983/solr/insert_core_here/update/json "insert_core_here" name have specified in solr.xml.
i hope answers question.
Comments
Post a Comment