DataStax Enterprise 2.2 Documentation

Running the Demo

This documentation corresponds to an earlier product version. Make sure this document corresponds to your version.

Latest DSE documentation | Earlier DSE documentation

You can run Solr on one or more nodes, assuming you installed DataStax Enterprise 2.0 or later. DataStax does not support running Solr and Hadoop on the same node, although it's possible to do so in a development environment. In production environments, run Solr and Hadoop on separate nodes.

Starting a Solr node

Follow these steps to start DSE Search/Solr on a single node.

  1. Start DSE as a Solr node.

  2. In another shell, check that your Cassandra ring is up and running. For example, on a Mac:

    RHEL or Debian installations

    dsetool ring -h localhost
    

    Tar distribution, such as Mac

    cd <install_location>/bin
    
    ./dsetool ring -h localhost
    

    A table of information appears showing the state of the node and identifying it as a Solr node.

    Now, set up and run the DSE search demo.

Running the Wikipedia Demo

After starting DSE as a Solr node, open a shell window or tab, and follow these steps to run the demo.

  1. Make the wikipedia demo directory your current directory. The location of the demo directory depends on your platform:

    RHEL or Debian installations

    cd  /usr/share/dse-demos/wikipedia
    

    Tar distribution

    cd <install_location>/demos/wikipedia
    
  2. Add the schema:

    ./1-add-schema.sh
    

    The script posts solrconfig.xml and schema.xml to these locations:

  3. Index the articles contained in the wikipedia-sample.bz2 file in the demo directory:

    ./2-index.sh --wikifile wikipedia-sample.bz2
    

    Three thousand articles load.

  4. To see a sample Wikipedia search UI, open your web browser and go to:

    http://localhost:8983/demos/wikipedia
    

    ../../_images/wikipedia1.png
  5. Inspect the index keyspace, wiki, using the Solr Admin tool:

    http://localhost:8983/solr/wiki.solr/admin/
    

    Be sure to enter the trailing "/".


    ../../_images/wikipedia2.png
  6. Inspect the column family, solr. In the Solr Admin tool, click SCHEMA to inspect the schema.

To load all Wikipedia articles from the internet into Solr, repeat steps 1 and 2. In step 3, use the name of the file on the internet instead of the name of wikipedia-sample.bz2. The name of the file on the internet is:

enwiki-20111007-pages-articles25.xml-p023725001p026625000.bz2

Loading all the articles takes a long time, so be patient. To limit the number of articles, use the limit option. For example, to limit the number of articles to 10,000, use this command in step 3:

./2-index.sh --wikifile enwiki-20111007-pages-articles25.xml-p023725001p026625000.bz2 --limit 10000

Using DataStax Enterprise and DSE Search, you can now:

  • Run Hadoop MapReduce on the data on DataStax Enterprise analytics nodes.
  • Update an individual column under a row in Cassandra and find the updated data in search results.
  • Take advantage of Solr searching to query Cassandra using CQL.