Skip to content

Instantly share code, notes, and snippets.

@googletorp
Last active December 20, 2015 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save googletorp/6060593 to your computer and use it in GitHub Desktop.
Save googletorp/6060593 to your computer and use it in GitHub Desktop.
Patch for search api v 1.1 using websolr
diff --git a/includes/solr_connection.inc b/includes/solr_connection.inc
index 8a26212..6839367 100644
--- a/includes/solr_connection.inc
+++ b/includes/solr_connection.inc
@@ -95,12 +95,12 @@ class SearchApiSolrConnection implements SearchApiSolrConnectionInterface {
/**
* Path to the system servlet.
*/
- const SYSTEM_SERVLET = 'admin/system';
+ //const SYSTEM_SERVLET = 'admin/system';
/**
* Path to the stats servlet.
*/
- const STATS_SERVLET = 'admin/stats.jsp';
+ //const STATS_SERVLET = 'admin/stats.jsp';
/**
* Path to the stats servlet for Solr 4.x servers.
@@ -396,7 +396,7 @@ class SearchApiSolrConnection implements SearchApiSolrConnectionInterface {
* Implements SearchApiSolrConnectionInterface::getSolrVersion().
*/
public function getSolrVersion() {
- $system_info = $this->getSystemInfo();
+ //$system_info = $this->getSystemInfo();
// Get our solr version number
if (isset($system_info->lucene->{'solr-spec-version'})) {
return $system_info->lucene->{'solr-spec-version'}[0];
@@ -450,7 +450,7 @@ class SearchApiSolrConnection implements SearchApiSolrConnectionInterface {
* Implements SearchApiSolrConnectionInterface::getStatsSummary().
*/
public function getStatsSummary() {
- $stats = $this->getStats();
+ //$stats = $this->getStats();
$solr_version = $this->getSolrVersion();
$summary = array(
@@ -487,7 +487,7 @@ class SearchApiSolrConnection implements SearchApiSolrConnectionInterface {
$summary['@index_size'] = trim(current($size_xpath));
}
else {
- $system_info = $this->getSystemInfo();
+ //$system_info = $this->getSystemInfo();
$docs_pending_xpath = $stats->xpath('//lst["stats"]/long[@name="docsPending"]');
$summary['@pending_docs'] = (int) trim(current($docs_pending_xpath));
$max_time_xpath = $stats->xpath('//lst["stats"]/str[@name="autocommit maxTime"]');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment