API - Check Optimize Status

Documentation > API-Index Management > API - Check Optimize Status

Check Optimize Status

After starting an optimization with the Optimize endpoint, use this to check whether it is still running or has completed. Returns current index statistics including segment count, index size, document count, and deleted documents.

  1. GET https://opensolr.com/solr_manager/api/optimize_status
  2. Parameters:
    1. email - your Opensolr registration email address
    2. api_key - your Opensolr API key
    3. core_name - the name of the index being optimized
  3. Example: https://opensolr.com/solr_manager/api/optimize_status?email=PLEASE_LOG_IN&api_key=PLEASE_LOG_IN&core_name=my_solr_index
  4. Response fields:
    • running (boolean) — true if optimization is currently in progress
    • finished (boolean) — true if optimization completed successfully
    • segments — current number of index segments (1 = fully optimized)
    • size_bytes — current index size in bytes
    • num_docs — number of documents in the index
    • deleted_docs — number of deleted documents not yet reclaimed
  5. Example response (running):
    {"status":true,"msg":{"running":true,"finished":false,"segments":5,"size_bytes":1073741824,"num_docs":50000,"deleted_docs":1200,"log":""}}
  6. Example response (complete):
    {"status":true,"msg":{"running":false,"finished":true,"segments":1,"size_bytes":890000000,"num_docs":50000,"deleted_docs":0,"log":"{...}"}}