We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 9092eb55 authored by Evan Prodromou's avatar Evan Prodromou

throw exception on sphinx search error

parent c9fbe2ea
...@@ -65,6 +65,9 @@ class SphinxSearch extends SearchEngine ...@@ -65,6 +65,9 @@ class SphinxSearch extends SearchEngine
function query($q) function query($q)
{ {
$result = $this->sphinx->query($q, $this->remote_table()); $result = $this->sphinx->query($q, $this->remote_table());
if ($result === false) {
throw new ServerException($this->sphinx->getLastError());
if (!isset($result['matches'])) return false; if (!isset($result['matches'])) return false;
$id_set = join(', ', array_keys($result['matches'])); $id_set = join(', ', array_keys($result['matches']));
$this->target->whereAdd("id in ($id_set)"); $this->target->whereAdd("id in ($id_set)");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment