Book Image

Apache Solr High Performance

By : Surendra Mohan
Book Image

Apache Solr High Performance

By: Surendra Mohan

Overview of this book

Table of Contents (14 chapters)

Dealing with an infinite loop exception in shards


As you might be aware that while working with shards, we need to add the IP address of the shards to every query we shoot. To avoid including the IP address of the shards on every query, something might come to mind and you suddenly think of writing them to solrconfig.xml and leave the task of adding the shards' addresses to Solr. So, you added them to the default request handler of your solrconfig.xml file and executed your example query that landed in an infinite loop exception. You might be wondering how to prevent such exceptions from occurring, despite adding the shard addresses to the handler. In this section, we will learn how to overcome infinite loop exception in shards.

We define the following request handler in our solrconfig.xml file, assuming that the IP address of the Solr server we are going to query is 192.168.0.100:

<requestHandler name="standard" class="solr.SearchHandler" default="true">
<lst name="defaults">...