function apachesolr_index_report_readonly in Apache Solr Search 7
Report attempts to change the index when an env is read-only.
A flag can be set to disable these watchdog warnings by setting the system variable 'apachesolr_report_readonly_to_watchdog' to FALSE.
Parameters
string $env_id: An apachesolr environment id.
5 calls to apachesolr_index_report_readonly()
- apachesolr_index_delete_bundles in ./
apachesolr.index.inc - Delete from the index documents with the entity type and any of the excluded bundles.
- apachesolr_index_delete_entity_from_index in ./
apachesolr.index.inc - Delete an entity from the index.
- apachesolr_index_delete_index in ./
apachesolr.index.inc - Delete the whole index for an environment.
- apachesolr_index_nodeapi_mass_delete in ./
apachesolr.index.inc - Mass delete nodes from the solr indexer tables. TODO: This always assumes the default environment!
- apachesolr_index_nodeapi_mass_update in ./
apachesolr.index.inc - Mass Update nodes from the solr indexer table TODO: This always assumes the default environment!
File
- ./
apachesolr.index.inc, line 1581 - Functions related to Apache Solr indexing operations.
Code
function apachesolr_index_report_readonly($env_id) {
$backtrace = debug_backtrace();
if (variable_get('apachesolr_report_readonly_to_watchdog', TRUE)) {
watchdog('Apache Solr', 'Environment @env_id: Trying to update the Solr index while the environment @env_id is read-only in function %function', array(
'%function' => $backtrace[1]['function'],
'@env_id' => $env_id,
), WATCHDOG_WARNING);
}
}