Book Image

Apache Solr Search Patterns

By : Jayant Kumar
Book Image

Apache Solr Search Patterns

By: Jayant Kumar

Overview of this book

Table of Contents (17 chapters)
Apache Solr Search Patterns
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Asynchronous calls


Since some API calls, such as shard splitting, can take a long time and result in timeouts, we have the option of running a call asynchronously by specifying the async=<request_id> parameter in the URL. <request_id> is any ID that can be used to track the status of a particular API call. The request_id class and the status of the task are stored in ZooKeeper and can be retrieved using the REQUESTSTATUS action on the collections API.

Tip

We can delete and recreate catcollection using the following API calls or URLs:

http://solr1:8080/solr/admin/collections?action=DELETE&name=catcollection
http://solr1:8080/solr/admin/collections?action=CREATE&name=catcollection&numShards=2&replicationFactor=2&maxShardsPerNode=2&collection.configName=conf1&router.field=cat

catcollection can be populated using docs.csv file provided by the following command:

java -Dtype=text/csv -Durl=http://solr4:8080/solr/catcollection/update -jar post.jar docs.csv

To...