From b48df57d9243336d4b96e29c5587137eff3a3c67 Mon Sep 17 00:00:00 2001 From: David Cabo Date: Fri, 23 Sep 2011 02:50:41 +0200 Subject: Remove invalid collate argument for public body searches The existing bug wasn't catched by the tests, because it only fails when running in dev: otherwise all the classes are loaded before the search is done, and acts_as_xapian can find the provided 'request_collapse' argument, even if the PublicBody class doesn't define it, since all the init options end up together in acts_as_xapian. --- app/controllers/request_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/request_controller.rb') diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 06d8f15f4..e719a8898 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -39,7 +39,7 @@ class RequestController < ApplicationController if !params[:query].nil? query = params[:query] + '*' query = query.split(' ').join(' OR ') # XXX: HACK for OR instead of default AND! - @xapian_requests = perform_search([PublicBody], query, 'relevant', 'request_collapse', 5) + @xapian_requests = perform_search([PublicBody], query, 'relevant', nil, 5) end medium_cache end -- cgit v1.2.3