Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ $results = $sphinx->search('my query', 'index_name')->query();

Basic query (with Eloquent)
```php
$results = $sphinx->search('my query', 'index_name')->get();
$results = $sphinx->search('my query', 'index_name')->get(); // Throws SphinxSearchException
```

Query another Sphinx index with limit and filters.
Expand Down
2 changes: 2 additions & 0 deletions src/sngrl/SphinxSearch/SphinxSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ public function get($respect_sort_order = false)
} else {
$result = array();
}
} else {
throw new SphinxSearchException($this->_connection->GetLastError());
}
if ($respect_sort_order) {
if (isset($matchids)) {
Expand Down
10 changes: 10 additions & 0 deletions src/sngrl/SphinxSearch/SphinxSearchException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace sngrl\SphinxSearch;

use Exception;

class SphinxSearchException extends Exception
{
//
}