From f413c7bfb232db038dcb1265fda1bf5dabb9b4f8 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Fri, 6 Jan 2012 09:53:36 +0000 Subject: Don't wildcard search public bodies when making a request (it causes performance issues and isn't useful here anyway) --- app/controllers/request_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/controllers/request_controller.rb') diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index dad5e81cd..8672fdf75 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -35,9 +35,8 @@ class RequestController < ApplicationController # do nothing - as "authenticated?" has done the redirect to signin page for us return end - if !params[:query].nil? - query = params[:query] + '*' + query = params[:query] query = query.split(' ').join(' OR ') # XXX: HACK for OR instead of default AND! @xapian_requests = perform_search([PublicBody], query, 'relevant', nil, 5) end -- cgit v1.2.3