Solr getting started tutorial

Steps for setting up Cassandra and Solr for the tutorial.

Setting up Cassandra and Solr for this tutorial involves the same basic steps as setting up a typical DSE Search/Solr application:
  • Create a Cassandra table.
  • Import data.
  • Create a search index.

These steps for setting up Cassandra and Solr are explained in detail in this tutorial. After completing the setup, you use DSE Search/Solr to perform simple queries, sort the query results, and construct facet queries.

In this tutorial, you use some sample data from a health-related census.


This setup assumes you started DataStax Enterprise in DSE Search/Solr mode and downloaded the sample data and tutorial files. The tutorial files consist of a Solr schema that corresponds to the CQL table definition, which uses a compound primary key. The partitioning key is the id column and the clustering key is the age column. Also included in the schema are several copy fields and a multivalued field that are used for the faceted search.


  1. Download the sample data and tutorial files.
  2. Unzip the files you downloaded in the DataStax Enterprise installation home directory.
    A solr_CQL3tutorial directory is created that contains the following files.
    • copy_nhanes.cql

      The COPY command you use to import data

    • create_nhanes.cql

      The Cassandra CQL table definition

    • nhanes52.csv

      The CSV (comma separated value) data

    • schema.xml

      The Solr schema

    • solrconfig.xml

      The Solr configuration file

  3. Take a look at these files using your favorite editor.