An ad-free and cookie-free website.
Developing capabilities in the search for sites space can get confusing. Offerings include a managed SAAS search offering like Google custom search or Amazon CloudSearch, among others. Others prefer to build custom search a solr web offering or Elasticsearch search capabilities on top of Apache Lucene libraries.
Either way, search is moving to the cloud and Apache SolrCloud offering
is what sits behind many offerings, so getting up to speed with how
search in the cloud is managed is a necessity. The
solr healthcheck command offers a
fast way to see all of the different nodes, shards, replicas and
collections so you can monitor the health of your SolrCloud search
solr healthcheck command will
report on all active collections on the SolrCloud server as specified
by collection or by host and port number.
solr healthcheck command is one of
12 commands within the main
solr healthcheck command itself has 2
options, also known as parameters.
The syntax for running
is as follows.
The list of 2 options including default values are explained in the table below.
This syntax assumes your current working directory is
the $SOLR_HOME directory for Solr, which for version 7
standalone mode for a local installation. When running in a production
environment the directory locations may differ.
So the path to the location of the solr script is:
solr script can be run using the
./solr from within
When using Windows, the solr script is called using
solr healthcheck command the
-c <collection> option
(parameters) is required. Other options are optional.
||Print a JSON-formatted report on a SolrCloud collection.||A collection is required|
||Connect to an existing Zookeeper instance in SolrCloud mode. ZooKeeper instances are often started on the default port (8983) plus 1000, or 9983.||localhost:9983|
Below is a list of items reported in JSON format when using the
bin/solr healthcheck command in
SolrCloud mode on the collection specified.
For each shard identified above the healthcheck provides the following information.
For each replica the following information is reported in JSON format.
The following command will run a healthcheck on an established and running SolrCloud instance with a collection named mycollection.
The following command runs a healthcheck on a collection called mycollection on a non-default port 9984.
From the command line you can access additional help on the Solr
healthcheck command by appending
-help after the command.
FactorPad offers Apache Solr Search content in both tutorials and reference.
The learning never stops, please join us at our YouTube Channel and follow @factorpad.
A newly-updated free resource. Connect and refer a friend today.