Explorar el Código

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

master
Dylan Baker hace 4 años
padre
commit
6af6dbab76
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2
    2
      lib/search.rb

+ 2
- 2
lib/search.rb Ver fichero

@@ -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…
Cancelar
Guardar