Browse Source

Up limit from 10 to 50 since the query is fast now

master
Dylan Baker 4 years ago
parent
commit
6af6dbab76
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      lib/search.rb

+ 2
- 2
lib/search.rb View File

@@ -35,7 +35,7 @@ def search_threads(db, query, username, sort, offset)
35 35
       to_tsvector(title) @@ plainto_tsquery(?)
36 36
       AND (LOWER(threads.creator) = LOWER(?) OR ? = '')
37 37
     ORDER BY #{sort}
38
-    LIMIT 10
38
+    LIMIT 50
39 39
     OFFSET ?;
40 40
   SQL
41 41
 end
@@ -54,7 +54,7 @@ def search_posts(db, query, username, offset)
54 54
         (LOWER(posts.creator) = LOWER(?)) OR (? = '')
55 55
       )
56 56
     ORDER BY created_at DESC
57
-    LIMIT 10
57
+    LIMIT 50
58 58
     OFFSET ?;
59 59
   SQL
60 60
 end

Loading…
Cancel
Save