Validating the Deployment with the Solr REST API
Validate the deployment by indexing and querying documents with the Solr REST API. Before beginning this process, you must have access to the Solr admin web console, as detailed in Deploying Cloudera Search.
The tutorial provides examples that work with an environment established using a package-based installation. If you installed Cloudera Search using parcels, adjust file paths accordingly.
$ cd /usr/share/doc/solr-doc*/example/exampledocs $ java -Durl=http://$SOLRHOST:8983/solr/collection1/update -jar post.jar *.xml
After you have indexed data, you can run a query.
To run a query:
- Open the following link in a browser, replacing $SOLRHOST with the name of any host running the Solr process: http://$SOLRHOST:8983/solr.
- Click the collection name in the left panel.
- Click Query in the Menu and select execute query.
Consider indexing more data using the Solr REST API, or move to batch indexing with MapReduce or NRT indexing with Flume. To learn more about Solr, see the Apache Solr Tutorial.