Getting Started

Solr demo

This demo application uses Wikipedia as an example of Solr capabilities.

This demo runs on a single node. Although it's possible to run Solr and Hadoop the same node in a development environment, it's not required for this demo. In production environments, you must run Solr and Hadoop on separate nodes.


In a terminal window:

  1. Check which mode DataStax Enterprise is running in:
    1. Run the following command:
      $ nodetool status ## GUI/Text Services and package installs
      $ bin/nodetool status ## GUI/Text No Services and tarball installs
    2. If the data center does not show Solr, stop the node:
      • Packaged installs:
        $ sudo service dse stop
      • Tarball installs: From the install location (using sudo if necessary):
        $ bin/dse cassandra-stop
    3. Start DSE as a Solr node:
      • Packaged installs: Edit the /etc/default/dse file, and change SOLR_ENABLED=0 to SOLR_ENABLED=1 and then start DataStax Enterprise:
        $ sudo service dse start
      • Tarball installs: From the install directory:
        $ bin/dse cassandra -s
  2. In another terminal, check that your Cassandra ring is up and running:
    • Packaged installs:
      $ nodetool status
    • Tarball installs:
      $ cd install_location/bin
      $ bin/nodetool status
    The results that appears should show something like:
    Datacenter: Solr
    |/ State=Normal/Leaving/Joining/Moving
    --  Address        Load      Owns    Host ID                               Token                 Rack
    UN  33.24 KB  100.0%  4ae7ce57-b2cb-400e-83e3-1755de36e1af  -9223372036854775808  rack1
  3. Make the wikipedia demo directory your current directory:
    • Packaged installs:
      $ cd /usr/share/dse-demos/wikipedia
    • Tarball installs:
      $ cd install_location/demos/wikipedia
  4. Upload the schema:
    The script posts solrconfig.xml and schema.xml to these locations:
    • http://localhost:8983/solr/resource/wiki.solr/solrconfig.xml
    • http://localhost:8983/solr/resource/wiki.solr/schema.xml

    The script also creates the Solr index and core. The wiki.solr part of the URL creates the keyspace (wiki) and the column family (solr) in Cassandra.

  5. Index the articles contained in the wikipedia-sample.bz2 file in the demo directory:
    ./ --wikifile wikipedia-sample.bz2
    Three thousand articles load.
  6. To see the sample Wikipedia search UI, open your web browser and go to:

  7. Open the Solr Admin tool.
    Be sure to enter the trailing "/".
  8. Inspect the wiki keyspace. From the Core Selector drop-down, select wiki.solr.

  9. Inspect the table, solr. In the Solr Admin tool, click Schema.

What's next

Running the demo on a secure cluster

You can run the wikipedia, stress, and log search demo directories on a secure cluster.

Kerberos Options

  • -a enable Kerberos authentication
  • -h hostname server hostname (not required if server hostname resolution is correctly set up)

HTTP Basic Authentication

Use with Cassandra's PasswordAuthenticator.

  • -u username
  • -p password

SSL Options

  • -e cert enable HTTPS for client to node encryption, using cert certificate file
  • -k disable strict hostname checking for SSL certificates