about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-04-14T20·05+0200
committerVincent Ambo <github@tazj.in>2018-04-14T20·21+0200
commitdae97fdaf5a9541895d9719f1f58902cca846e2b (patch)
treefb886ec8d9ce4e4b99f05cddbd07a2c2ab0c737d
parent39d1cd64bc5ffe250dc2a30d05d0b6312e7abbc1 (diff)
chore(db): Arbitrarily limit search result size
... until pagination is in place.
-rw-r--r--src/db.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/db.rs b/src/db.rs
index a4f86977c5f4..22438d2b8766 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -162,6 +162,7 @@ SELECT post_id,
   FROM search_index, search_query
   WHERE document @@ query
   ORDER BY ts_rank(document, query) DESC
+  LIMIT 50
 "#;
 
 impl Handler<SearchPosts> for DbExecutor {