API - Flush Crawl Buffer to Solr

Web Crawler
Web Crawler API

Flush Crawl Buffer to Solr

Force any documents remaining in the crawler's internal batch buffer to be flushed directly into your Solr index. Use when the crawler is paused or finished and you suspect uncommitted documents.

Endpoint

GET https://opensolr.com/solr_manager/api/flush_crawl_buffer

Parameters

ParameterStatusDescription
emailRequiredYour Opensolr registration email address
api_keyRequiredYour Opensolr API key
core_nameRequiredThe name of the index to flush the crawl buffer for
Only use this when the crawler is not actively running. If the crawler is running, it manages its own buffer flushes automatically. This endpoint is for cases where crawling was paused or stopped and you want to ensure all discovered content is searchable.

Response

Returns a JSON object with status (true/false) and msg indicating how many documents were flushed, or that the buffer was already empty.

Code Examples

cURL

curl -s "https://opensolr.com/solr_manager/api/flush_crawl_buffer?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_solr_core"

PHP

$params = http_build_query([
    'email'     => 'YOUR_EMAIL',
    'api_key'   => 'YOUR_API_KEY',
    'core_name' => 'my_solr_core',
]);
$response = file_get_contents("https://opensolr.com/solr_manager/api/flush_crawl_buffer?{$params}");
$result = json_decode($response, true);
echo $result['msg'] . "\n";

Python

import requests

response = requests.get("https://opensolr.com/solr_manager/api/flush_crawl_buffer", params={
    "email": "YOUR_EMAIL",
    "api_key": "YOUR_API_KEY",
    "core_name": "my_solr_core",
})
data = response.json()
print(data["msg"])

Related Documentation

Need help with the Opensolr Web Crawler? We are here to help.

Contact Support