From c94959378aad0f1c39701cd797cacd954b636ab0 Mon Sep 17 00:00:00 2001 From: SJ Date: Wed, 6 May 2015 09:35:12 +0200 Subject: [PATCH] improved tag/note search --- webui/model/search/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webui/model/search/search.php b/webui/model/search/search.php index d18cdd32..74f90ed8 100644 --- a/webui/model/search/search.php +++ b/webui/model/search/search.php @@ -439,7 +439,7 @@ class ModelSearchSearch extends Model { $s = $this->fixup_sphinx_operators($s); - $q = $this->sphx->query("SELECT iid FROM $sphx_table WHERE uid=" . $session->get("uid") . " AND MATCH('@$field $s') "); + $q = $this->sphx->query("SELECT iid FROM $sphx_table WHERE uid=" . $session->get("uid") . " AND MATCH('@$field $s') LIMIT 0," . MAX_SEARCH_HITS . " OPTION max_matches=" . MAX_SEARCH_HITS); if(ENABLE_SYSLOG == 1) { syslog(LOG_INFO, "sphinx query: " . $q->query . ", hits: " . $q->total_found); } foreach($q->rows as $a) {