Starts an optimize of your Opensolr Index in the background: Solr merges it into one segment and drops the deleted documents for good.
https://opensolr.com/solr_manager/api/optimizeemail and api_key of your account, as GET or POST parameters: Authentication.01 · Parameters
core_nameRequiredThe name of your index.
02 · Example
curl -s "https://opensolr.com/solr_manager/api/optimize?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_index"
03 · Answer
{ "status": true, "working": true, "started": true, "done_time_ms": null, "segments": 14, "size_bytes": 734003200, "num_docs": 120000, "deleted_docs": 8200 }
workingtrue while an optimize runs.
startedtrue when this call started it, false when one was already running.
done_time_msHow long the last finished optimize took, when there was one.
segments, size_bytes, num_docs, deleted_docsThe index as it is now.
04 · Errors
ERROR_NOT_CORE_OWNERHTTP 200The index is not yours.
ERROR_AUTHENTICATION_FAILEDHTTP 403The email and API key do not match.
ERROR_RATE_LIMIT_PER_MINUTEHTTP 429Too many calls. Wait for the Retry-After seconds: Rate limits.
05 · Related
Follow it: optimize_status. A recurring optimize from the Control Panel: Schedule Optimize.
Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.