aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-03-25 16:17:03 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-03-25 16:17:03 +1100
commit060d9fe70a1de0ba9aa592d25d6e7352114aa431 (patch)
treeee1c9485ffce0e7aa956af0133c616651e2ff8fb /app/controllers/application_controller.rb
parentd09758c79fff462906b48dda6601ced25a8865da (diff)
Inline method InfoRequest.full_search
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index df522519d..4f3624ab7 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -378,7 +378,13 @@ class ApplicationController < ActionController::Base
else
@page = this_page
end
- result = InfoRequest.full_search(models, @query, order, ascending, collapse, @per_page, @page)
+ result = ActsAsXapian::Search.new(models, @query,
+ :offset => (@page - 1) * @per_page,
+ :limit => @per_page,
+ :sort_by_prefix => order,
+ :sort_by_ascending => ascending,
+ :collapse_by_prefix => collapse
+ )
result.results # Touch the results to load them, otherwise accessing them from the view
# might fail later if the database has subsequently been reopened.
return result