def result_object(index)
      klass = "Udongo::Search::ResultObjects::#{namespace}::#{index.searchable_type}"
      klass = 'Udongo::Search::ResultObjects::Base' unless result_object_exists?(klass)
      klass.constantize.new(index, search_context: self)
    end
def result_object(index)
      klass = "Udongo::Search::ResultObjects::#{namespace}::#{index.searchable_type}"
      klass = 'Udongo::Search::ResultObjects::Base' unless result_object_exists?(klass)
      klass.constantize.new(index, search_context: self)
    end
In order to provide a good result set in a search autocomplete, we have
 to translate the raw index to a class that makes an index adhere
 to a certain interface (that can include links).