I'm writing an application using Datastax Enterprise and DSE Search (SolR on Cassandra).
My problem is i need to generate schema.xml and send to SolR both solrconfig.xml and schema.xml using Java, dynamically. Not using curl.
I tried doing it using Commons HttpComponents but the solrconfig.xml file inserted into cassandra table is not correct. Http related data is inserted before the beginning of the XML file, like this :
��:
solr_adminsolr_resourcesresource_value��--9NDJNu2AW4jtIyX6ggQAgEqI3FXp3JpDZ6
Content-Disposition: form-data; name="solrconfig.xml"; filename="solrconfig.xml"
Content-Type: application/xml; charset=ISO-8859-1
Content-Transfer-Encoding: binary
<config>
<!-- In all configuration below, a prefix of "solr." for class names
is an alias that causes solr to search appropriate packages,
including org.apache.solr.(search|update|request|core|analysis)
[Continued...]
And of course SolR fails when it tries to read this configuration.
Do someone know how to send these two files programmatically from java to SolR correctly?
Thanks in advance for your answers.