Book Image

Solr Cookbook - Third Edition

By : Rafal Kuc
Book Image

Solr Cookbook - Third Edition

By: Rafal Kuc

Overview of this book

Table of Contents (18 chapters)
Solr Cookbook Third Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Removing replicas


Sometimes, there is a need of removing one or more replicas from your Solr cluster. Either because you want to get rid of some nodes and you want your cluster state to become clean or you want to move some shard to another node and delete the original shard. No matter what the case is, there might come a time where you need to delete a shard. This recipe will show you how to do it.

Getting ready

Before reading further, I advise you to read the Creating a new SolrCloud cluster and Having more than a single shard from a collection on a node recipes in this chapter. These recipes will show you how to create a new SolrCloud cluster and create a collection. We also assume that ZooKeeper is running on 192.168.1.10 and is listening on port 2181. We already have the configuration called firstcollection stored in ZooKeeper and we already have four SolrCloud nodes running as a cluster.

How to do it...

  1. To show you how to delete replicas from the already existing collection, we will create...