Last active
December 20, 2015 02:59
-
-
Save googletorp/6060593 to your computer and use it in GitHub Desktop.
Patch for search api v 1.1 using websolr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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