]> source.dussan.org Git - redmine.git/commit
Rewrites search engine to properly paginate results (#18631).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 12 Dec 2014 20:49:31 +0000 (20:49 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 12 Dec 2014 20:49:31 +0000 (20:49 +0000)
commit2fe806a4a49cc3fcd7c2b7fe3a385d3a46ffbfd5
tree82f8da72bfdc6e68c83cbecf3ffac2b5bcc9738a
parent963719042a12e7833a95396036a662237a7939a0
Rewrites search engine to properly paginate results (#18631).

Instead of counting and retrieving results based on their timestamps, we now load all result ids then load the appropriate results by their ids. This also brings a 2x performance improvement as we search tokens in one of the 2 queries only.

git-svn-id: http://svn.redmine.org/redmine/trunk@13739 e93f8b46-1217-0410-a6f0-8f06a7374b81
app/controllers/search_controller.rb
app/models/changeset.rb
app/models/document.rb
app/models/issue.rb
app/models/message.rb
app/models/news.rb
app/models/wiki_page.rb
app/views/search/index.html.erb
lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb
test/functional/search_controller_test.rb
test/unit/search_test.rb