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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.