Browse Source

fix priority calculation on zero value in PR

main
ghost 1 year ago
parent
commit
0bda87fbe6
  1. 2
      library/sphinxql.php

2
library/sphinxql.php

@ -13,7 +13,7 @@ class SphinxQL { @@ -13,7 +13,7 @@ class SphinxQL {
public function searchHostPages(string $keyword, string $mime, int $start, int $limit, int $maxMatches) {
$query = $this->_sphinx->prepare('SELECT *, WEIGHT() + `rank` * 1000 AS `priority`
$query = $this->_sphinx->prepare('SELECT *, WEIGHT() + `rank` * IF (`rank` > 0, 1000, 1) AS `priority`
FROM `hostPage`

Loading…
Cancel
Save