Monitoring Solr segments

Monitor Solr segments.

To monitor Solr segments, use the Segments Info screen in the Solr Administration User Interface application. You can also use this API endpoint and specify the Solr collection path name:

solr/<Solr collection path name>/admin/segments

The following example obtains the segment information for the Solr GeoNames collection. The example specifies the IP address and port, and specifies that the output is to be returned in JSON format and indented.

http://127.0.0.1:8983/solr/solr.geonames/admin/segments?wt=json&indent=true

The following output shows the segment information, which is truncated for brevity:

{
  "responseHeader":{
    "status":0,
    "QTime":3},
  "segments":{
    "_0":{
      "name":"_0",
      "delCount":5256,
      "sizeInBytes":1843747,
      "size":6439,
      "sizeMB":1.7583341598510742,
      "delRatio":0.816275819226588,
      "age":"2017-06-15T15:21:09.730Z",
      "source":"flush"},
    "_1":{
      "name":"_1",
      "delCount":5351,
      "sizeInBytes":1881895,
      "size":6554,
      "sizeMB":1.7947149276733398,
      "delRatio":0.816447970704913,
      "age":"2017-06-15T15:21:09.786Z",
      "source":"flush"},
    "_3":{
      "name":"_3",
      "delCount":5553,
      "sizeInBytes":1952348,
      "size":6850,
      "sizeMB":1.8619041442871094,
      "delRatio":0.8106569343065694,
      "age":"2017-06-15T15:21:09.790Z",
      "source":"flush"},
  ...
}

The following table describes the segment properties in the previous output:

Property Description
name
Segment name
delCount
Number of documents deleted from the segment
sizeInBytes
Segment size in bytes
size
Number of documents in the segment
sizeMB
Segment size in megabytes
delRatio
Delete ratio, which is based on the ratio for the segment delete count and number of documents in the segment
age
Date and time that the segment was created
source
Segment source; flush sends the recent index changes to stable storage

For more information, see the Apache Solr online reference guide located at https://lucene.apache.org/solr/guide.