lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: Creating a new core programmicatically in solr
Date Tue, 04 Jun 2013 16:51:26 GMT
Best to submit your inquiry as a DataStax support ticket or on their support 
forum. They have people standing by ready to support you.

-- Jack Krupansky

-----Original Message----- 
From: Saikat Kanjilal
Sent: Tuesday, June 04, 2013 12:41 PM
To: solr-user@lucene.apache.org
Subject: Creating a new core programmicatically in solr

Hello everyone,
I have written some simple java code to create a core programmatically in 
solr and it seems to be returning 200 but I see no core being created inside 
the solr admin console, here's what I've tried, BTW for what its worth we 
are using the DSE implementation of solr which uses cassandra underneath:

1) The code to create the core is shown below:

HttpGet req = new 
HttpGet(getSolrClient().getBaseUrl()+ADMIN_CORE_CONSTRUCT+"?action="+action+"&name="+name);

ADMIN_CORE_CONSTRUCT=/admin/cores

Result When executing this code:  200 but no core created, note that in the 
previous parts of the code I have successfully created the solrconfig.xml 
and schema.xml successfully for this core using the appropriate rest APIs

2) From the command line if I type:
curl 
"http://hostname:8983/solr/admin/cores?action=CREATE&name=NEW_SCHEMA.solr"

The core will get created successfully and I will see it in the solr admin 
console, for some reason the double quotes are needed for this command


3) From the browser using restclient I tried to emulate the curl behavior by 
typing in the URL and making it a GET request with the appropriate headers: 
(Accept:application/xml;charset=UTF-8
Content-Type:application/xml;charset=UTF-8), however I keep getting 
BadRequest responses from the DSE solr cluster.


I cant see anything obvious that number 3 and number 1 are missing, I was 
wondering if anyone had run into this before and what the issue may be. 
Thanks for your help.

Regards



 


Mime
View raw message