Permalink
Browse files

more results

  • Loading branch information...
1 parent 6e53d6a commit 9fcc2fb233b8514abeef7005a5311cbdea783db2 @aaronblohowiak committed Oct 22, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 app.rb
View
@@ -10,7 +10,6 @@
require 'set'
require 'rubberband'
-
COMMAND_FIELDS = Set.new(%w{num_keys script description name sha example})
ROOT_PATH = File.dirname(__FILE__)
@@ -82,7 +81,7 @@ def not_found(locals = {path: nil})
on get, "commands/:name" do |name|
@name = name
- @commands = @search.search({:query=>{:field=>{"name"=>name}}, :sort => [{"updated_at"=>"asc"}], :fields => ["name", "sha", "updated_at"]}).to_a
+ @commands = @search.search({:query=>{:field=>{"name"=>name}}, :sort => [{"updated_at"=>"asc"}], :fields => ["name", "sha", "updated_at"]},{:limit=>10_000}).to_a
@commands.map!{|c| OpenStruct.new(c.fields) }
if @commands.length == 1
@@ -93,7 +92,7 @@ def not_found(locals = {path: nil})
end
on get, "commands" do
- @commands = @search.search({:sort => [{"updated_at"=>"asc"}], :fields => ["name", "sha", "updated_at"]}).to_a
+ @commands = @search.search({:sort => [{"updated_at"=>"asc"}], :fields => ["name", "sha", "updated_at"]},{:limit=>10_000}).to_a
@commands = @commands.map{|c| OpenStruct.new(c.fields) }
res.write haml("commands")
end

0 comments on commit 9fcc2fb

Please sign in to comment.