From d5cae2d3d633082b12a304f35557bd2e5b18edda Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 5 Aug 2015 16:59:14 +0200 Subject: [PATCH] Fixed non search index based ticket search. --- app/controllers/search_controller.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index a9bad5b6d..2b8469e8d 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -87,12 +87,15 @@ class SearchController < ApplicationController assets = {} result = [] - search_index_objects = %w( User Organization ) + objects = %w( Ticket User Organization ) if SearchIndexBackend.enabled? + # to ticket search in serparate call + objects.delete('Ticket') + # to query search index backend (excluse tickets here, see below) found_objects = {} - items = SearchIndexBackend.search( query, limit, search_index_objects ) + items = SearchIndexBackend.search( query, limit, objects ) items.each { |item| require item[:type].to_filename record = Kernel.const_get( item[:type] ).find( item[:id] )