Run the Wikipedia demo on a single node to download Wikipedia articles, create a CQL
table, store the articles, and index the articles in Solr.
The following instructions describe how to run the wikipedia demo on a single node.
The scripts that you run in this demo are written to set up the localhost and fail
if the default interface of the node is not 127.0.0.1.
Procedure
-
Start DataStax Enterprise as a Solr
node if you haven't already done so.
-
Go to the wikipedia demo directory:
- Installer-Services and Package installations: $ cd
/usr/share/dse/demos/wikipedia
- Installer-No Services and Tarball installations:
$ cd
install_location/demos/wikipedia
-
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.
-
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.
-
To see the sample Wikipedia search UI, open your web browser and go to the
following URL:
http://localhost:8983/demos/wikipedia
-
Search for a word in the bodies of the articles. In the search textbox, enter a
word, and press Enter.
-
Open the Solr Admin tool.
Be sure to enter the trailing "/".
http://localhost:8983/solr/
-
Inspect the schema. In the Solr Admin, select wiki.solr
from the Core Selector drop-down. Click the
Schema in the vertical navigation bar.