Distributed indexing and searching
In SolrCloud
, the main goal behind distributed indexing is to send a document to any node in the cluster and have that document indexed in the shard.
Solr uses a document router to assign a document to a shard. There are two basic document routing strategies:
compositeId
(default)- Implicit
In compositeId
(default), when we send documents to Solr for indexing, Solr uses the hash of the document to distribute the load to multiple Solr instances. Previously in this chapter, we added a few documents to the index. Now let's see how Solr distributes the load to multiple Solr instances.
As we're running two instances of Solr locally (shard1
on 8983
and shard2
on 8987
), we'll run the following two queries with the distrib ...
Get Apache Solr for Indexing Data 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.