Distributed indexing and search

Now that we have SolrCloud up and running, let us see how indexing and search happen in a distributed environment. Go to the <solr_installation>/example/exampledocs folder where there are some sample XML files. Let us add some documents from the hd.xml file to SolrCloud. We will use the node solr1 for adding documents to the index. Here we are passing the collection name in the update URL instead of the core. The output from the command execution is shown in the following snippet:

$ java -Durl=http://solr1:8080/solr/mycollection/update -jar post.jar hd.xml
SimplePostTool version 1.5
Posting files to base url http://solr1:8080/solr/mycollection/update using content-type application/xml..
POSTing file hd.xml
1 files ...

Get Apache Solr Search Patterns now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.