/api/cores or /solr/admin/cores return very useful information about the
current status of all the cores for the solr instance against which they
are invoked.

However, if Solr instance has just rebooted then these calls come back with
empty responses like below or contain only the cores loaded so far. Is
there a way to make them wait till all the cores are loaded?

Empty Response:
{ "responseHeader":{ "status":0, "QTime":150}, "initFailures":{},
"status":{}}

Partial Response:
{
  "responseHeader":{
    "status":0,
    "QTime":35},
  "initFailures":{},
  "status":{
    "books":{
      "name":"books",
      "instanceDir":"/var/lib/solr/books",
      "dataDir":"/var/lib/solr/books/data/",
      "config":"solrconfig.xml",
      "schema":"schema.xml",
      "startTime":"2022-11-14T20:55:36.571Z",
      "uptime":4286,
      "index":{
        "numDocs":0,
        "maxDoc":0,
        "deletedDocs":0,
        "indexHeapUsageBytes":0,
        "version":4748,
        "segmentCount":0,
        "current":true,
        "hasDeletions":false,

"directory":"org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/var/lib/solr/books/data/index
lockFactory=org.apache.lucene.store.NativeFSLockFactory@7bae9d87;
maxCacheMB=48.0 maxMergeSizeMB=4.0)",
        "segmentsFile":"segments_c1",
        "segmentsFileSizeInBytes":119,
        "userData":{
          "commitCommandVer":"0",
          "commitTimeMSec":"1658435977333"},
        "lastModified":"2022-07-21T20:39:37.333Z",
        "sizeInBytes":119,
        "size":"119 bytes"}}}}

Because the books core above is empty and a very simple core, it gets
loaded pretty fast compared to other data-heavy cores.
The Final response when all cores are loaded contains 19 such cores in my
case.

Reply via email to