def search
      return [] unless term.valid?

      ::SearchTerm.create!(locale: controller.locale, term: term.value)

      indices.map do |index|
        result = result_object(index)
        next if result.hidden? || result.unpublished? || result.url.nil?
        { label: result.label, value: result.url }
      end.select(&:present?)
    end
def search
      return [] unless term.valid?

      ::SearchTerm.create!(locale: controller.locale, term: term.value)

      indices.map do |index|
        result = result_object(index)
        next if result.hidden? || result.unpublished? || result.url.nil?
        { label: result.label, value: result.url }
      end.select(&:present?)
    end
This translates the filtered indices into meaningful result objects.
 These require a { label: ... value: ... } to accommodate jquery-ui.

 Note that the result_object#url method is defined in
 Udongo::Search::ResultObjects::Frontend::Page.

 If you return nil in the #url method of a result object, the item
 will get filtered out of the search results.