Uploading the schema and configuration

Steps to create a Solr index by posting the solrconfig.xml and schema.xml.

After writing a schema.xml, you HTTP-post solrconfig.xml and schema.xml to a DSE Search node in the DataStax Enterprise cluster to create a Solr index. You can also post additional resource files.

Resource files are stored in Cassandra database, not in the file system. The schema.xml and solrconfig.xml resources are persisted in the solr_admin.solr_resources database table.

Procedure

  1. Post the configuration file using the cURL utility:
    curl http://localhost:8983/solr/resource/keyspace.table/solrconfig.xml
      --data-binary @solrconfig.xml -H 'Content-type:text/xml; charset=utf-8'
  2. Post the schema file:
    curl http://localhost:8983/solr/resource/keyspace.table/schema.xml
      --data-binary @schema.xml -H 'Content-type:text/xml; charset=utf-8'
  3. Post any other resources that you might need.
    curl http://localhost:8983/solr/resource/keyspace.table/myResourceFile.xml
      --data-binary @schema.xml -H 'Content-type:text/xml; charset=utf-8'
    
    You can specify a path:
    curl http://localhost:8983/solr/resource/keyspace.table/myPath1/myPath2/myResourceFile.xml
      --data-binary @schema.xml -H 'Content-type:text/xml; charset=utf-8'
    To verify the resources after they are posted, view the Solr admin table.