Fixed non search index based ticket search.
This commit is contained in:
parent
e84a91da5d
commit
d5cae2d3d6
1 changed files with 5 additions and 2 deletions
|
@ -87,12 +87,15 @@ class SearchController < ApplicationController
|
||||||
|
|
||||||
assets = {}
|
assets = {}
|
||||||
result = []
|
result = []
|
||||||
search_index_objects = %w( User Organization )
|
objects = %w( Ticket User Organization )
|
||||||
if SearchIndexBackend.enabled?
|
if SearchIndexBackend.enabled?
|
||||||
|
|
||||||
|
# to ticket search in serparate call
|
||||||
|
objects.delete('Ticket')
|
||||||
|
|
||||||
# to query search index backend (excluse tickets here, see below)
|
# to query search index backend (excluse tickets here, see below)
|
||||||
found_objects = {}
|
found_objects = {}
|
||||||
items = SearchIndexBackend.search( query, limit, search_index_objects )
|
items = SearchIndexBackend.search( query, limit, objects )
|
||||||
items.each { |item|
|
items.each { |item|
|
||||||
require item[:type].to_filename
|
require item[:type].to_filename
|
||||||
record = Kernel.const_get( item[:type] ).find( item[:id] )
|
record = Kernel.const_get( item[:type] ).find( item[:id] )
|
||||||
|
|
Loading…
Reference in a new issue