Uploading the schema and configuration 

Create a Solr index by posting solrconfig.xml and schema.xml to a DSE Search node in the DataStax Enterprise cluster.

Tune the schema before you upload. All field definitions in the schema are validated and must be DSE Search compatible, even if the fields are not indexed, have docValues applied, or used for copy-field source. The default behavior of automatic resource generation includes all columns. To improve performance, include only the required fields.

Remove or comment out unused fields in the schema to prevent loading these fields from the database to the indexing path.

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

You can configure the maximum resource file size or disable resource upload. with the Solr resource upload limit option in dse.yaml.

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 schema file:
    $ dsetool write_resource keyspace.table name=schema.xml file=schemaFile.xml
  2. Post the configuration file:
    $ dsetool write_resource keyspace.table name=solrconfig.xml file=solrconfigFile.xml
  3. Post any other resources that you might need.
    $ dsetool write_resource keyspace.table name=ResourceFile.xml file=schemaFile.xml
    You can specify a path for the resource file:
    $ dsetool write_resource keyspace.table name=ResourceFile.xml file=myPath1/myPath2/schemaFile.xml
  4. Resource files are stored in the Cassandra database. To view the resources, use dsetool read_resource or use the Solr Admin interface. To verify the resources after they are posted:
    For example:
    $ dsetool read_resource keyspace.table name=ResourceFile.xml file=myPath1/myPath2/schemaFile.xml