1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-22 10:57:56 +01:00

Merge pull request #5784 from 3D-I/ticket/15902

[ticket/15902] Out of range error with Sphinx search
This commit is contained in:
Marc Alexander 2019-12-24 16:20:04 +01:00
commit 8fe5063a35
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -644,7 +644,7 @@ class fulltext_sphinx
$this->sphinx->SetFilter('deleted', array(0));
$this->sphinx->SetLimits((int) $start, (int) $per_page, SPHINX_MAX_MATCHES);
$this->sphinx->SetLimits((int) $start, (int) $per_page, max(SPHINX_MAX_MATCHES, (int) $start + $per_page));
$result = $this->sphinx->Query($search_query_prefix . $this->sphinx->EscapeString(str_replace('"', '"', $this->search_query)), $this->indexes);
// Could be connection to localhost:9312 failed (errno=111,
@ -675,7 +675,7 @@ class fulltext_sphinx
{
$start = floor(($result_count - 1) / $per_page) * $per_page;
$this->sphinx->SetLimits((int) $start, (int) $per_page, SPHINX_MAX_MATCHES);
$this->sphinx->SetLimits((int) $start, (int) $per_page, max(SPHINX_MAX_MATCHES, (int) $start + $per_page));
$result = $this->sphinx->Query($search_query_prefix . $this->sphinx->EscapeString(str_replace('"', '"', $this->search_query)), $this->indexes);
// Could be connection to localhost:9312 failed (errno=111,