瀏覽代碼

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

master
Dylan Baker 5 年之前
父節點
當前提交
6af6dbab76
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. 2
    2
      lib/search.rb

+ 2
- 2
lib/search.rb 查看文件

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

Loading…
取消
儲存