diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5657f6e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vendor \ No newline at end of file diff --git a/Services/Search/Sphinxsearch.php b/Services/Search/Sphinxsearch.php index 7ba0354..39bb462 100644 --- a/Services/Search/Sphinxsearch.php +++ b/Services/Search/Sphinxsearch.php @@ -176,9 +176,12 @@ public function search($query, array $indexes, array $options = array(), $escape * Perform the query. */ $results = $this->sphinx->query($query, $indexNames); - if( $results['status'] !== SEARCHD_OK ) + if( $results['status'] === SEARCHD_ERROR ) throw new \RuntimeException(sprintf('Searching index "%s" for "%s" failed with error "%s".', $label, $query, $this->sphinx->getLastError())); + if( $results['status'] === SEARCHD_RETRY ) + throw new \RuntimeException(sprintf('Searching index "%s" for "%s" failed with retry "%s".', $label, $query, $this->sphinx->getLastError())); + return $results; }