function apachesolr_stats_apachesolr_query_alter in Apache Solr Statistics 6.3
Same name and namespace in other branches
- 7 apachesolr_stats.module \apachesolr_stats_apachesolr_query_alter()
Implementation of hook_apachesolr_query_alter().
Adds debugQuery parameter to Solr call that returns processing time, etc.
File
- ./
apachesolr_stats.module, line 101 - Keeps and reports statistics about Apache Solr usage and performance.
Code
function apachesolr_stats_apachesolr_query_alter($query) {
if (variable_get('apachesolr_stats_enabled', array())) {
// Add the debug query argument.
// See: http://wiki.apache.org/solr/CommonQueryParameters#head-f45a9396425956a4db8d6478ed6029adfb7b0858
$query
->replaceParam('debugQuery', 'true');
}
}